Skip to content

fs/constfs: omit leading '/' in readdir() #17626

Merged
chrysn merged 2 commits intoRIOT-OS:masterfrom
benpicco:fs/constfs-readdir
Feb 9, 2022
Merged

fs/constfs: omit leading '/' in readdir() #17626
chrysn merged 2 commits intoRIOT-OS:masterfrom
benpicco:fs/constfs-readdir

Conversation

@benpicco
Copy link
Copy Markdown
Contributor

@benpicco benpicco commented Feb 8, 2022

Contribution description

This aligns ConstFS readdir() implementation more with POSIX.

Testing procedure

main(): This is RIOT! (Version: 2022.04-devel-288-g28fa5)
constfs mounted successfully
> ls /const
ls /const
hello-world	14 B
hello-riot	13 B
total 2 files
> cat /const/hello-world
cat /const/hello-world
Hello World!

Issues/PRs references

#14635

This aligns ConstFS readdir() implementation more with POSIX.
@benpicco benpicco requested a review from chrysn February 8, 2022 15:30
@github-actions github-actions bot added the Area: sys Area: System label Feb 8, 2022
@benpicco benpicco added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) labels Feb 8, 2022
Copy link
Copy Markdown
Member

@chrysn chrysn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd probably have gone for documenting that there can be no slashes in the file names, changing the examples and adding asserts for good measure -- but this is indeed a good resolution, and a nonbreaking on top of it. (If the single slashes in flash cause offense, the more complex plan can still be put into action.)

Thanks, I approve!

@chrysn chrysn merged commit 09bbded into RIOT-OS:master Feb 9, 2022
@benpicco benpicco deleted the fs/constfs-readdir branch February 9, 2022 10:43
@OlegHahm OlegHahm added this to the Release 2022.04 milestone Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: sys Area: System CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants