Open blomnik opened 3 years ago
This seem similar to https://github.com/littlefs-project/littlefs/issues/534. Sorry I don't have any more time to look into this but I figured I'd drop the breadcrumb :)
Yes, sure it is the same.
Hi @blomnik, thanks for creating an issue, sorry about such a late response.
I believe this has actually be fixed in https://github.com/littlefs-project/littlefs/pull/637 (available now in v2.4.2)? Let me know if this isn't the case.
I have this hunk of code
Size of
container_t
is 48 bytes. Size offile_header_t
is 16 bytes. Invoking oflfs_file_seek()
updatefile->pos
to 16 andfile->off
still remain 48. So, when I first invokelfs_file_read()
it reads correctly (because file is large enough) but at incorrect position. This is not applicable whenLFS_READONLY
macro not defined. Is it bug? Is it enough to patch something like this:I suppose, that in LFS_READONLY mode internal static function
lfs_file_outline()
does not invoke andoff
field does not update.Thank you.