Commit graph

3 commits

Author SHA1 Message Date
Felix Johnson
bd173a540c
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 <pauamma@gundo.com>
Differential Revision:	https://reviews.freebsd.org/D51138
2025-07-04 01:14:19 -04:00
Robert Wing
3701f50099 write.2: sweep error code referencing disklabel(8)
The "-W" option for disklabel(8) was retired in:
    f080d33b66

The ioctl used by the "-W" option, DIOCWLABEL, was retired in:
    5777c5b989
2025-05-27 13:33:50 -08:00
Brooks Davis
8269e7673c libsys: relocate implementations and manpages
Remove core system call implementations and documentation to lib/libsys
and lib/libsys/<arch> from lib/libc/sys and lib/libc/<arch>/<sys>.
Update paths to allow libc to find them in their new home.

Reviewed by:	kib, emaste, imp
Pull Request:	https://github.com/freebsd/freebsd-src/pull/908
2024-02-05 20:34:55 +00:00
Renamed from lib/libc/sys/write.2 (Browse further)