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)
Thu, Dec 12, 12:49 AM
Unknown Object (File)
Sat, Nov 23, 1:36 PM
Unknown Object (File)
Nov 21 2024, 4:14 AM
Unknown Object (File)
Nov 19 2024, 8:26 PM
Unknown Object (File)
Nov 6 2024, 2:15 PM
Unknown Object (File)
Nov 5 2024, 1:05 PM
Unknown Object (File)
Oct 18 2024, 3:01 AM
Unknown Object (File)
Oct 17 2024, 5:02 PM
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.