Page MenuHomeFreeBSD

libsa: replace remaining _write callbacks by null_write
ClosedPublic

Authored by tsoome on Feb 26 2018, 4:44 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 14, 12:08 AM
Unknown Object (File)
Feb 27 2024, 3:58 AM
Unknown Object (File)
Feb 13 2024, 3:32 AM
Unknown Object (File)
Feb 12 2024, 5:39 AM
Unknown Object (File)
Jan 6 2024, 8:33 AM
Unknown Object (File)
Oct 11 2023, 11:01 PM
Unknown Object (File)
Jun 14 2023, 1:23 AM
Unknown Object (File)
Jun 11 2023, 11:11 AM
Subscribers

Details

Summary

There are some _write callbacks left only returning EROFS, replace them
by null_write. return EROFS from null_write().

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Feb 26 2018, 4:46 PM
kan added a subscriber: kan.

... looks ok.

lidl added inline comments.
stand/libsa/tftp.c
81 ↗(On Diff #39758)

From a technical standpoint, there's nothing that prevents the tftp code from having write method. I don't know that it would be terribly useful (except maybe for 'nextboot' type support).

Perhaps a comment is warranted here, to note that it could be done, it's just a SMOP (small matter of programming).

stand/libsa/tftp.c
81 ↗(On Diff #39758)

Yes, same for other filesystems too, except that it is rather confusing for user, unfortunately.

Also specifically for tftp, it is quite common practice to keep tftpboot tree read only and tftpd service running with minimal rights... So it is not just about having the code not written, but we would rather keep it not written.

stand/libsa/tftp.c
81 ↗(On Diff #39758)

Not necessarily all other filesystems. iso9660 is probably exclusively RO.

No objection. I don't think these error codes actually trickle into anywhere user visible (or to any process that cares, other than != 0).

This revision was automatically updated to reflect the committed changes.