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
path: root/lfs.c
diff options
context:
space:
mode:
authorThemba Dube <embeddedthemba@gmail.com>2021-01-06 19:20:41 +0300
committerChristopher Haster <chaster@utexas.edu>2021-01-11 09:14:30 +0300
commit3216b07c3bce220115ea8c5c8b3eb1e452bf6de0 (patch)
tree19fb66fba3e6e63081dbe1e6ff81fb39c98be80a /lfs.c
parent6bb404315405ba6f5217c061c0e3fb2a0d19099b (diff)
Use lfs_file_rawsize to calculate LFS_SEEK_END position
Diffstat (limited to 'lfs.c')
-rw-r--r--lfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lfs.c b/lfs.c
index c59d3d2..281f138 100644
--- a/lfs.c
+++ b/lfs.c
@@ -3055,7 +3055,7 @@ static lfs_soff_t lfs_file_rawseek(lfs_t *lfs, lfs_file_t *file,
} else if (whence == LFS_SEEK_CUR) {
npos = file->pos + off;
} else if (whence == LFS_SEEK_END) {
- npos = file->ctz.size + off;
+ npos = lfs_file_rawsize(lfs, file) + off;
}
if (npos > lfs->file_max) {