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

Mounting a loop device from c. #944

Open
shalevv123 opened this issue Feb 15, 2024 · 1 comment
Open

Mounting a loop device from c. #944

shalevv123 opened this issue Feb 15, 2024 · 1 comment

Comments

@shalevv123
Copy link

shalevv123 commented Feb 15, 2024

Does littleFS c interface support mounting a loop device to a directory?
Somewhat like how you would mount a device in Linux using the mount function.
I know that littleFS-fuse does something similar but is there a support for this behavior without having to copy selected functions from the littleFS-fuse repo?

@shalevv123 shalevv123 changed the title Mounting an existing image from c. Mounting a loop device from c. Feb 15, 2024
@geky
Copy link
Member

geky commented Feb 17, 2024

I'm not really sure why this hasn't crossed my mind before. It would be easy enough to move lfs_fuse_bd into this repo (lfs_blkbd?).

The only concern is dealing with too many OS idiosyncrasies, but I guess with lfs_filebd already containing untestable Windows stuff the cat's already out of the bag.

If people want additional block devices specific to embedded OSes, for example, things can explode quickly. Though if there's interest in that we could make a separate repo to collect various bd impls.


Just to be clear, lfs_filebd and lfs_fuse_bd are basically the same, just with lfs_fuse_bd infering the block size/count via ioctl + BLKSSZGET + BLKGETSIZE64.

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

No branches or pull requests

2 participants