summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/common/file.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/firmware/common/file.c b/firmware/common/file.c
index 83c8e045fa..4443b55bca 100644
--- a/firmware/common/file.c
+++ b/firmware/common/file.c
@@ -573,6 +573,13 @@ int lseek(int fd, int offset, int whence)
573 return rc * 10 - 6; 573 return rc * 10 - 6;
574 } 574 }
575 file->cacheoffset = sectoroffset; 575 file->cacheoffset = sectoroffset;
576
577 /* seek back to current sector */
578 rc = fat_seek(&(file->fatfile), newsector);
579 if ( rc < 0 ) {
580 errno = EIO;
581 return rc * 10 - 7;
582 }
576 } 583 }
577 else 584 else
578 file->cacheoffset = -1; 585 file->cacheoffset = -1;