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:
authorLadislav Láska <krakonos@krakonos.org>2019-03-01 11:58:00 +0300
committerLadislav Láska <krakonos@krakonos.org>2019-03-01 12:01:02 +0300
commit26d25608b6139ef5dbef6f724591a930dcb79b4a (patch)
tree8201d09cddcac3de1897104b988fac4fc6bb5d63
parentd3a2cf48d449f259bc15a3a1058323132f3eeef7 (diff)
Fixed documentation for return lfs_dir_read return value.
lfs_dir_read breaks the convention of returning non-zero on success, this feature should be at least documented.
-rw-r--r--lfs.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/lfs.h b/lfs.h
index 9c3174e..b346008 100644
--- a/lfs.h
+++ b/lfs.h
@@ -448,7 +448,8 @@ int lfs_dir_close(lfs_t *lfs, lfs_dir_t *dir);
// Read an entry in the directory
//
// Fills out the info structure, based on the specified file or directory.
-// Returns a negative error code on failure.
+// Returns a positive value on success, 0 at the end of directory,
+// or a negative error code on failure.
int lfs_dir_read(lfs_t *lfs, lfs_dir_t *dir, struct lfs_info *info);
// Change the position of the directory