https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227185
--- Comment #3 from [email protected] --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=bd173a540c0ead4881b0866b721955440e3b96fe commit bd173a540c0ead4881b0866b721955440e3b96fe Author: Felix Johnson <[email protected]> AuthorDate: 2025-07-03 20:27:22 +0000 Commit: Alexander Ziaee <[email protected]> CommitDate: 2025-07-04 05:14:19 +0000 write.2: Add EINVAL to ERRORS Since phk rewrote the block layer ~2 decades ago, write(2) can return EINVAL when the target is a block device and nbytes, the write size, is not a multiple of the sector's block size. From the original PR: When coming from Linux, people are surprised by the fact that write(2) to a device must be aligned to block size. Writing a non-aligned block onto a raw device is a case where EINVAL is also returned but the manpage does not mention this. MFC after: 3 days PR: 227185 Reported by: riggs Reviewed by: imp, Pau Amma <[email protected]> Differential Revision: https://reviews.freebsd.org/D51138 lib/libsys/write.2 | 3 +++ 1 file changed, 3 insertions(+) -- You are receiving this mail because: You are on the CC list for the bug.
