[riot-devel] problem mounting littlefs

Bert Thomas bertthomas at betronic.nl
Thu Sep 3 16:59:42 CEST 2020


Hi all,

I am migrating from an old(er) version of RIOT to the 7-2020 version. I run into a problem mounting the littlefs filesystem.

At initialization function lfs_dir_fetch() is invoked. On line 448 of lfs.c the block is read into memory. The mtd function that implements this returns the number of bytes read, in my case that is 256 bytes. It appears to me that the following code considers this an "errorcode" where lfs_dir_fetch() is returning by the return on line 454. In lfs_mount() the return value is checked and causes  a goto to label "cleanup" where lfs_deinit() is invoked and the return value returned to the upper layer. In my application the error check fails as it only checks for negative values, but that is less important.

Is my analysis correct? How is it supposed to work?

Regards,
Bert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/devel/attachments/20200903/6c95f01a/attachment.htm>


More information about the devel mailing list