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

vfs: fall back to fstat() if stat() is not implemented #17966

Closed
wants to merge 1 commit into from

Conversation

benpicco
Copy link
Contributor

Contribution description

Instead of making the application work around this (as #14397 did) implement this in vfs so that vfs_stat() always works independent of the filesystem.

Testing procedure

TODO: Which filesystem implements fstat() but not stat()?

Issues/PRs references

@benpicco benpicco requested a review from chrysn April 19, 2022 22:44
@github-actions github-actions bot added the Area: sys Area: System label Apr 19, 2022
@chrysn
Copy link
Member

chrysn commented Apr 20, 2022 via email

@benpicco
Copy link
Contributor Author

Oh we already have vfs_sysop_stat_from_fstat (used by fatfs).
And spiffs (which is the only one that lacks a .stat implementation) provides SPIFFS_stat(), it's just not hooked up.

@benpicco benpicco closed this Apr 20, 2022
@benpicco benpicco deleted the vfs_fstat-fallback branch April 20, 2022 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: sys Area: System
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants