-
Notifications
You must be signed in to change notification settings - Fork 2k
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
sys/fs/constfs: drop dummy implementations #17651
Conversation
VFS will handle it if those functions are not implemented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally a good change, I went through vfs.c to verify that it all still does the same (but did not do any testing yet).
(void) filp; | ||
(void) src; | ||
(void) nbytes; | ||
return -EBADF; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is technically a change (vfs_write without a write returns -EINVAL), but I'd say it's for the better.
/* Removing files is prohibited */ | ||
(void) mountp; /* prevent warning: unused parameter */ | ||
(void) name; /* prevent warning: unused parameter */ | ||
return -EROFS; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is technically a change from -EPERM (which is the default) to -EROFS; probably OK (but may be worth a second thought).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't the default then rather be changed to -EROFS
? The function not being implemented is not a permission issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no strong opinions on the concrete standard error values we return due to POSIXish conventions; EROFS sounds just as good as EPERM to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I decided to change it to -EROFS
in VFS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, did some light testing (on rm, not full coverage, but I think it's enough).
Thanks, and ACK.
a235650
to
a587069
Compare
Contribution description
VFS will handle it if those functions are not implemented.
Testing procedure
Issues/PRs references