Page MenuHomeFreeBSD

libsa: replace remaining _write callbacks by null_write

Authored by tsoome on Feb 26 2018, 4:44 PM.



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

Diff Detail

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; 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.
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).

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.

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.