summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2020-02-11 13:19:17 +0000
committerschwarze <schwarze@openbsd.org>2020-02-11 13:19:17 +0000
commit77be7adc8ea37c4607091fd888bfa689b7c6fa33 (patch)
tree9f5430b4a15fc2cd1f15e738b52facc04689e704 /lib/libc
parentRemove setlocale(3) calls. I checked that no functions are called that (diff)
downloadwireguard-openbsd-77be7adc8ea37c4607091fd888bfa689b7c6fa33.tar.xz
wireguard-openbsd-77be7adc8ea37c4607091fd888bfa689b7c6fa33.zip
Some system calls can fail due to an open-ended variety of causes
in many underlying subsystems and device drivers. guenther@ pointed out this applies to system calls taking a file descriptor as an argument. deraadt@ warned against attempting to be excessively precise and against spreading fear, uncertainty, and doubt. So apply a minimal patch that merely avoids the misleading wording "will succeed unless", given that the lists aren't really exhaustive, and simply uses a more usual wording. Unfortunate wording reported by <David dot Raymond at nmt dot edu>.
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/sys/read.28
-rw-r--r--lib/libc/sys/symlink.26
-rw-r--r--lib/libc/sys/truncate.26
3 files changed, 10 insertions, 10 deletions
diff --git a/lib/libc/sys/read.2 b/lib/libc/sys/read.2
index 07269801fe7..eac151ff92a 100644
--- a/lib/libc/sys/read.2
+++ b/lib/libc/sys/read.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: read.2,v 1.36 2016/09/30 10:53:11 jca Exp $
+.\" $OpenBSD: read.2,v 1.37 2020/02/11 13:19:17 schwarze Exp $
.\" $NetBSD: read.2,v 1.6 1995/02/27 12:35:47 cgd Exp $
.\"
.\" Copyright (c) 1980, 1991, 1993
@@ -30,7 +30,7 @@
.\"
.\" @(#)read.2 8.4 (Berkeley) 2/26/94
.\"
-.Dd $Mdocdate: September 30 2016 $
+.Dd $Mdocdate: February 11 2020 $
.Dt READ 2
.Os
.Sh NAME
@@ -143,7 +143,7 @@ is set to indicate the error.
.Fn pread ,
and
.Fn preadv
-will succeed unless:
+will fail if:
.Bl -tag -width Er
.It Bq Er EBADF
.Fa d
@@ -210,7 +210,7 @@ is associated with a pipe, socket, FIFO, or tty.
.Fn readv
and
.Fn preadv
-may return one of the following errors:
+may return the following errors:
.Bl -tag -width Er
.It Bq Er EINVAL
.Fa iovcnt
diff --git a/lib/libc/sys/symlink.2 b/lib/libc/sys/symlink.2
index 1c7da668892..25bda090e98 100644
--- a/lib/libc/sys/symlink.2
+++ b/lib/libc/sys/symlink.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: symlink.2,v 1.20 2015/09/10 17:55:21 schwarze Exp $
+.\" $OpenBSD: symlink.2,v 1.21 2020/02/11 13:19:17 schwarze Exp $
.\" $NetBSD: symlink.2,v 1.7 1995/02/27 12:38:34 cgd Exp $
.\"
.\" Copyright (c) 1983, 1991, 1993
@@ -30,7 +30,7 @@
.\"
.\" @(#)symlink.2 8.1 (Berkeley) 6/4/93
.\"
-.Dd $Mdocdate: September 10 2015 $
+.Dd $Mdocdate: February 11 2020 $
.Dt SYMLINK 2
.Os
.Sh NAME
@@ -87,7 +87,7 @@ and the behavior is identical to a call to
.Sh RETURN VALUES
.Rv -std
.Sh ERRORS
-The symbolic link succeeds unless:
+The symbolic link will fail if:
.Bl -tag -width Er
.It Bq Er ENOTDIR
A component of the
diff --git a/lib/libc/sys/truncate.2 b/lib/libc/sys/truncate.2
index b5425140857..820583c650e 100644
--- a/lib/libc/sys/truncate.2
+++ b/lib/libc/sys/truncate.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: truncate.2,v 1.19 2016/02/28 14:38:25 natano Exp $
+.\" $OpenBSD: truncate.2,v 1.20 2020/02/11 13:19:17 schwarze Exp $
.\" $NetBSD: truncate.2,v 1.7 1995/02/27 12:39:00 cgd Exp $
.\"
.\" Copyright (c) 1983, 1991, 1993
@@ -30,7 +30,7 @@
.\"
.\" @(#)truncate.2 8.1 (Berkeley) 6/4/93
.\"
-.Dd $Mdocdate: February 28 2016 $
+.Dd $Mdocdate: February 11 2020 $
.Dt TRUNCATE 2
.Os
.Sh NAME
@@ -64,7 +64,7 @@ the file must be open for writing.
.Fn truncate
and
.Fn ftruncate
-will succeed unless:
+will fail if:
.Bl -tag -width Er
.It Bq Er EINVAL
The