Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/littlefs-project/littlefs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Haster <chaster@utexas.edu>2018-08-05 03:26:08 +0300
committerChristopher Haster <chaster@utexas.edu>2018-10-16 17:40:05 +0300
commit213530c3767da4acf6965b9f3c2f8a0f21f3b3b1 (patch)
treea0fb288eae79440d0996fe29344871fdfecc6a7d
parenta88230ae6a597c270020d716670d3c0738fd00c1 (diff)
Changed LFS_ERR_CORRUPT to match EILSEQ instead of EBADE
LFS_ERR_CORRUPT is unfortunately not a well defined error code. It's very important in the context of littlefs, but missing from the standard error codes defined in Linux. After some discussions with other developers, it was encouraged to use the encoding for EILSEQ over EBADE for representing on disk corrupt, as EILSEQ implies that there is something wrong with the data. I've changed this now to take advantage of the breaking changes in v2 to avoid a risky change to a return value.
-rw-r--r--lfs.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lfs.h b/lfs.h
index d63ea78..7635f3b 100644
--- a/lfs.h
+++ b/lfs.h
@@ -78,7 +78,7 @@ typedef uint32_t lfs_block_t;
enum lfs_error {
LFS_ERR_OK = 0, // No error
LFS_ERR_IO = -5, // Error during device operation
- LFS_ERR_CORRUPT = -52, // Corrupted
+ LFS_ERR_CORRUPT = -84, // Corrupted
LFS_ERR_NOENT = -2, // No directory entry
LFS_ERR_EXIST = -17, // Entry already exists
LFS_ERR_NOTDIR = -20, // Entry is not a dir