littlefs-project/littlefs-fuse

Block-size needs to be specified even for --stat

Opened this issue · 0 comments

After compiling littlefs-fuse, I create a disk for the PIC32MZEF2048EFG, which has 16kB flash blocks. After many unsuccessful attempts, I finally made it work. The --stat command requires the block_size parameter to work, otherwise it seems to assume 512 bytes. This kind of defeats the purpose of the stat command.

WORKING INSTRUCTIONS:

create a 1MiB file system with all 0xFF

dd if=/dev/zero bs=1M count=1 | tr "\000" "\377" > image.lfs

finds a free loop device

sudo losetup -f
/dev/loop46

attach the loop device to the image create above

sudo losetup /dev/loop46 image.lfs

formats the lfs file system (successful)

./lfs --block_size=16384 --format /dev/loop46

mount the device (successful)

./lfs --block_size=16384 /dev/loop46 mnt

NON-WORKING INSTRUCTIONS:
./lfs --stat /dev/loop46
littlefs/lfs.c:1369:error: Corrupted dir pair at {0x0, 0x1}
lfs_fuse.c:644:error: Invalid or incomplete multibyte or wide character

./lfs /dev/loop46 mnt
littlefs/lfs.c:1369:error: Corrupted dir pair at {0x0, 0x1}
lfs_fuse.c:673:error: Invalid or incomplete multibyte or wide character