Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
tabarnakos opened this issue Jul 10, 2024 · 0 comments
Open

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

tabarnakos opened this issue Jul 10, 2024 · 0 comments

Comments

@tabarnakos
Copy link

tabarnakos commented Jul 10, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant