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>2019-07-03 23:14:59 +0300
committerChristopher Haster <chaster@utexas.edu>2019-07-29 05:25:18 +0300
commit3806d8828504d303ba6a8e07656535d1e82808f9 (patch)
treeeb350b0e02c4fc03ece5ee5bd8528c9bd2d7856c
parentde5972699a3761d5602d8467df3f5f792bfb1b51 (diff)
Fixed seek-related typos in lfs.h
- lfs_file_rewind == lfs_file_seek(lfs, file, 0, LFS_SEEK_SET) - lfs_file_seek returns the _new_ position of the file
-rw-r--r--lfs.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/lfs.h b/lfs.h
index d09124b..504932d 100644
--- a/lfs.h
+++ b/lfs.h
@@ -528,7 +528,7 @@ lfs_ssize_t lfs_file_write(lfs_t *lfs, lfs_file_t *file,
// Change the position of the file
//
// The change in position is determined by the offset and whence flag.
-// Returns the old position of the file, or a negative error code on failure.
+// Returns the new position of the file, or a negative error code on failure.
lfs_soff_t lfs_file_seek(lfs_t *lfs, lfs_file_t *file,
lfs_soff_t off, int whence);
@@ -545,7 +545,7 @@ lfs_soff_t lfs_file_tell(lfs_t *lfs, lfs_file_t *file);
// Change the position of the file to the beginning of the file
//
-// Equivalent to lfs_file_seek(lfs, file, 0, LFS_SEEK_CUR)
+// Equivalent to lfs_file_seek(lfs, file, 0, LFS_SEEK_SET)
// Returns a negative error code on failure.
int lfs_file_rewind(lfs_t *lfs, lfs_file_t *file);