Skip to content

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

Closed
benpicco wants to merge 1 commit intoRIOT-OS:masterfrom
benpicco:vfs_fstat-fallback
Closed

vfs: fall back to fstat() if stat() is not implemented#17966
benpicco wants to merge 1 commit intoRIOT-OS:masterfrom
benpicco:vfs_fstat-fallback

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