History log of /src/lib/libsys/write.2 (Results 1 – 25 of 51)
Revision Date Author Comments
# 1c8d7bb4 26-Oct-2025 Konstantin Belousov <kib@FreeBSD.org>

write.2: explain the atomicity guarantees of the writes

Also provide the pointer to the latest POSIX standard that justifies the
requirement.

Reviewed by: emaste
Discussed with: rmacklem
Sponsored

write.2: explain the atomicity guarantees of the writes

Also provide the pointer to the latest POSIX standard that justifies the
requirement.

Reviewed by: emaste
Discussed with: rmacklem
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D53361

show more ...


# bd173a54 03-Jul-2025 Felix Johnson <felix.the.red@gmail.com>

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 sect

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

show more ...


# 3701f500 27-May-2025 Robert Wing <rew@FreeBSD.org>

write.2: sweep error code referencing disklabel(8)

The "-W" option for disklabel(8) was retired in:
f080d33b66306419b40c2f2a879198d3d5a8d36c

The ioctl used by the "-W" option, DIOCWLABEL, was r

write.2: sweep error code referencing disklabel(8)

The "-W" option for disklabel(8) was retired in:
f080d33b66306419b40c2f2a879198d3d5a8d36c

The ioctl used by the "-W" option, DIOCWLABEL, was retired in:
5777c5b9895805c33f1da4f72a3b5b297727888b

show more ...


# 8269e767 14-Nov-2023 Brooks Davis <brooks@FreeBSD.org>

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

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

show more ...


# dc36d6f9 23-Nov-2023 Warner Losh <imp@FreeBSD.org>

lib: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl s

lib: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by: Netflix

show more ...


# b2c76c41 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line nroff pattern

Remove /^\.\\"\s*\$FreeBSD\$$\n/


# 44b0b943 08-Oct-2022 Benedict Reuschling <bcr@FreeBSD.org>

Revert "Add extra EINVAL information about wrong block size to read(2)/write(2)"

This reverts commit 1c2be25f6080ee63baeae55e45761e1310d1b756.

kib@ pointed out that it is perfectly fine to write at

Revert "Add extra EINVAL information about wrong block size to read(2)/write(2)"

This reverts commit 1c2be25f6080ee63baeae55e45761e1310d1b756.

kib@ pointed out that it is perfectly fine to write at arbitrary regular
file offsets. For example, in a 4K block size character device, geom
doesn't support writing / reading 515 byte blocks. The description is
perhaps not applicable to all EINVALs returned.

show more ...


# 1c2be25f 07-Oct-2022 Benedict Reuschling <bcr@FreeBSD.org>

Add extra EINVAL information about wrong block size to read(2)/write(2)

The read system call will return EINVAL if the current file offset is
not a multiple of the block size. This also applies to w

Add extra EINVAL information about wrong block size to read(2)/write(2)

The read system call will return EINVAL if the current file offset is
not a multiple of the block size. This also applies to write(2). Add an
entry for EINVAL about this error to both man pages.

PR: 91149
Event: Aberdeen Hackathon 2022
Differential Revision: https://reviews.freebsd.org/D24617

show more ...


# 504e64af 20-Feb-2021 Guangyuan Yang <ygy@FreeBSD.org>

pwrite(2): add a BUGS section

Add a BUGS section about using pwrite(2) when O_APPEND is set on the fd.

MFC after: 3 days
Submitted by: Ka Ho Ng <khng300@gmail.com>
Reviewed by: gbe, yuripv
Differen

pwrite(2): add a BUGS section

Add a BUGS section about using pwrite(2) when O_APPEND is set on the fd.

MFC after: 3 days
Submitted by: Ka Ho Ng <khng300@gmail.com>
Reviewed by: gbe, yuripv
Differential Revision: https://reviews.freebsd.org/D28372

show more ...


# 0fda26db 26-Oct-2020 John-Mark Gurney <jmg@FreeBSD.org>

update write(2)'s iovec limit w/ info about the iosize_max_clamp sysctl...


# e42b0964 30-Mar-2020 John Baldwin <jhb@FreeBSD.org>

Document EINTEGRITY errors for many system calls.

EINTEGRITY was previously documented as a UFS-specific error for
mount(2). This documents EINTEGRITY as a filesystem-independent error
that may be

Document EINTEGRITY errors for many system calls.

EINTEGRITY was previously documented as a UFS-specific error for
mount(2). This documents EINTEGRITY as a filesystem-independent error
that may be reported by the backing store of a filesystem.

While here, document EIO as a filesystem-independent error for both
mount(2) and posix_fadvise(2). EIO was previously only documented for
UFS for mount(2).

Reviewed by: mckusick
Suggested by: mckusick
MFC after: 2 weeks
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D24168

show more ...


# aeb71118 01-Dec-2017 Warner Losh <imp@FreeBSD.org>

Mark all the system calls that were in 1st Edition Unix as such in the
HISTORY section. Note: Any system calls that were added prior to v7,
but after v1 weren't changed.

Obtained from: http://www.tu

Mark all the system calls that were in 1st Edition Unix as such in the
HISTORY section. Note: Any system calls that were added prior to v7,
but after v1 weren't changed.

Obtained from: http://www.tuhs.org/cgi-bin/utree.pl?file=V1/man/man2

show more ...


# 31a4787b 17-Oct-2017 Ed Maste <emaste@FreeBSD.org>

write.2: correct maximum nbytes size for EINVAL error

In FreeBSD 11 and later debug.iosize_max_clamp defaults to 0, and the
maximum nbytes count for write(2) is SSIZE_MAX. Update the man page to
doc

write.2: correct maximum nbytes size for EINVAL error

In FreeBSD 11 and later debug.iosize_max_clamp defaults to 0, and the
maximum nbytes count for write(2) is SSIZE_MAX. Update the man page to
document this, and mention the sysctl that can be set to obtain the
previous behaviour.

PR: 196666
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

show more ...


# fbbd9655 28-Feb-2017 Warner Losh <imp@FreeBSD.org>

Renumber copyright clause 4

Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is

Renumber copyright clause 4

Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by: Jan Schaumann <jschauma@stevens.edu>
Pull Request: https://github.com/freebsd/freebsd/pull/96

show more ...


# d0ec8fd0 15-Dec-2015 Kevin Lo <kevlo@FreeBSD.org>

Remove sys/types.h due to STANDARDS and unistd.h also includes sys/types.h.


# c36029e6 12-Sep-2013 Bryan Drewery <bdrewery@FreeBSD.org>

Consistently reference file descriptors as "fd". 55 other manpages
used "fd", while these used "d" and "filedes".

MFC after: 1 week
Approved by: gjb
Approved by: re (delphij)


# e0c980d9 22-Jan-2012 Pawel Jakub Dawidek <pjd@FreeBSD.org>

The sys/uio.h header is needed only for readv(2), preadv(2), writev(2) and
pwritev(2). Document it more precisely.

Reviewed by: jilles
MFC after: 3 days


# c879ae35 09-Jan-2007 Warner Losh <imp@FreeBSD.org>

Per Regents of the University of Calfornia letter, remove advertising
clause.

# If I've done so improperly on a file, please let me know.


# 27111d39 21-Oct-2006 Simon L. B. Nielsen <simon@FreeBSD.org>

Minor markup fix: A comma should be seperated by space from macro
argument. This resulted in "pwritev,()" instead of the intended
"pwritev()," in the output.

MFC after: 3 days


# 1427d59b 14-Apr-2006 Ruslan Ermilov <ru@FreeBSD.org>

List pwritev in the NAME section.


# 110e1704 17-Nov-2005 Ruslan Ermilov <ru@FreeBSD.org>

-mdoc sweep.


# bcd9e0dd 07-Jul-2005 John Baldwin <jhb@FreeBSD.org>

- Add two new system calls: preadv() and pwritev() which are like readv()
and writev() except that they take an additional offset argument and do
not change the current file position. In SAT spe

- Add two new system calls: preadv() and pwritev() which are like readv()
and writev() except that they take an additional offset argument and do
not change the current file position. In SAT speak:
preadv:readv::pread:read and pwritev:writev::pwrite:write.
- Try to reduce code duplication some by merging most of the old
kern_foov() and dofilefoo() functions into new dofilefoo() functions
that are called by kern_foov() and kern_pfoov(). The non-v functions
now all generate a simple uio on the stack from the passed in arguments
and then call kern_foov(). For example, read() now just builds a uio and
calls kern_readv() and pwrite() just builds a uio and calls kern_pwritev().

PR: kern/80362
Submitted by: Marc Olzheim marcolz at stack dot nl (1)
Approved by: re (scottl)
MFC after: 1 week

show more ...


# 75fa96cc 10-Feb-2005 Colin Percival <cperciva@FreeBSD.org>

read(), pread(), write(), and pwrite() return EINVAL if they are asked
for more than INT_MAX bytes.


# a39fd506 25-Oct-2004 Yaroslav Tykhiy <ytykhiy@gmail.com>

Reword the last change a bit, add mdoc(7) markup.

Discussed with: bde


# 9a0cabd9 16-Oct-2004 Yaroslav Tykhiy <ytykhiy@gmail.com>

Explain it is a negative offset that EINVAL may indicate.
Now readers won't get an impression that pointing to beyond
the current end of file will result in EINVAL.

MFC after: 1 week


123