Summary: | write(2) blocksize behaviour on raw devices should be added to manpage | ||||||
---|---|---|---|---|---|---|---|
Product: | Documentation | Reporter: | Thomas Zander <riggs> | ||||
Component: | Manual Pages | Assignee: | freebsd-bugs (Nobody) <bugs> | ||||
Status: | New --- | ||||||
Severity: | Affects Only Me | CC: | doc | ||||
Priority: | --- | ||||||
Version: | Latest | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Ping. |
Created attachment 192068 [details] Example code The topic has been brought to my attention by a colleague at work. When coming from Linux (and today, most folks do), people are surprised by the fact that write(2) to a device must be aligned to block size. (see attached example code) I think it would be beneficial to mention this in the manpage, since at the moment it claims that a write() will only fail with EINVAL for an invalid file descriptor and if nbytes is greater than SSIZE_MAX. Writing a non-aligned block onto a raw device is a case where EINVAL is also returned but the manpage does not mention this.