Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 01 Apr 2018 17:40:27 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-doc@FreeBSD.org
Subject:   [Bug 227185] write(2) blocksize behaviour on raw devices should be added to manpage
Message-ID:  <bug-227185-9@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D227185

            Bug ID: 227185
           Summary: write(2) blocksize behaviour on raw devices should be
                    added to manpage
           Product: Documentation
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Documentation
          Assignee: freebsd-doc@FreeBSD.org
          Reporter: riggs@FreeBSD.org
 Attachment #192068 text/plain
         mime type:

Created attachment 192068
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D192068&action=
=3Dedit
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 f=
ile
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.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-227185-9>