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

Getting disk version.. #826

Open
bitzer-tjo opened this issue May 15, 2023 · 2 comments · Fixed by #838
Open

Getting disk version.. #826

bitzer-tjo opened this issue May 15, 2023 · 2 comments · Fixed by #838

Comments

@bitzer-tjo
Copy link

Hi

When we update to the latest LFS version, it may use a filesystem created with the privious version.
So I would like, after mount, get the disk version of the mounted filesystem and than call the makeconsisten function to change the disk version of it..

Am I mistaken or is there no function to get disk version of the underlaying filesystem?

Thomas

@geky
Copy link
Member

geky commented May 17, 2023

Hi @TjoBitDk, thanks for creating an issue.

The intention was that lfs_fs_mkconsistent could be called unconditionally, it does no work if the filesystem is already consistent/version bumped. Also note lfs_fs_mkconsistent is called implicitly by all write operations. You don't need to call it yourself unless you want to force littlefs to write the minor version bump.

But I can see how accessing the current minor version would be handy. We can add this.

The first place that comes to mind is lfs_fs_stat in #753, though that PR is stalled, so maybe we should bring in lfs_fs_stat in a separate PR.

@geky
Copy link
Member

geky commented Jun 6, 2023

Functionality for this is being added in #838

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

Successfully merging a pull request may close this issue.

2 participants