summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorYaroslav Tykhiy <ytykhiy@gmail.com>2001-08-09 13:32:13 +0000
committerYaroslav Tykhiy <ytykhiy@gmail.com>2001-08-09 13:32:13 +0000
commitb1250632c5fc76d3b403ef995ee04bf5db2b8493 (patch)
tree251e4417acf32d993acd2d301d7ead7122c562cf /lib/libc
parent91ce3c5b858af828f30bf79525f7e4560f33d2f9 (diff)
downloadsrc-test2-b1250632c5fc76d3b403ef995ee04bf5db2b8493.tar.gz
src-test2-b1250632c5fc76d3b403ef995ee04bf5db2b8493.zip
Notes
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/compat-43/killpg.25
-rw-r--r--lib/libc/compat-43/sigvec.25
-rw-r--r--lib/libc/gen/msgctl.36
-rw-r--r--lib/libc/gen/msgsnd.35
-rw-r--r--lib/libc/gen/raise.35
-rw-r--r--lib/libc/gen/sem_destroy.37
-rw-r--r--lib/libc/gen/sem_getvalue.37
-rw-r--r--lib/libc/gen/sem_init.37
-rw-r--r--lib/libc/gen/sem_post.37
-rw-r--r--lib/libc/gen/uname.36
-rw-r--r--lib/libc/i386/sys/i386_vm86.28
-rw-r--r--lib/libc/posix1e/acl_free.35
-rw-r--r--lib/libc/posix1e/cap_clear.35
-rw-r--r--lib/libc/posix1e/cap_free.35
-rw-r--r--lib/libc/posix1e/cap_get_flag.35
-rw-r--r--lib/libc/stdio/remove.37
-rw-r--r--lib/libc/stdlib/radixsort.35
-rw-r--r--lib/libc/sys/adjtime.25
-rw-r--r--lib/libc/sys/bind.25
-rw-r--r--lib/libc/sys/close.25
-rw-r--r--lib/libc/sys/connect.25
-rw-r--r--lib/libc/sys/flock.25
-rw-r--r--lib/libc/sys/fsync.23
-rw-r--r--lib/libc/sys/getfh.25
-rw-r--r--lib/libc/sys/getpeername.22
-rw-r--r--lib/libc/sys/getrusage.26
-rw-r--r--lib/libc/sys/getsockname.22
-rw-r--r--lib/libc/sys/kill.25
-rw-r--r--lib/libc/sys/ktrace.25
-rw-r--r--lib/libc/sys/link.25
-rw-r--r--lib/libc/sys/listen.22
-rw-r--r--lib/libc/sys/madvise.26
-rw-r--r--lib/libc/sys/minherit.26
-rw-r--r--lib/libc/sys/mkdir.24
-rw-r--r--lib/libc/sys/mkfifo.24
-rw-r--r--lib/libc/sys/mknod.25
-rw-r--r--lib/libc/sys/mprotect.27
-rw-r--r--lib/libc/sys/msync.24
-rw-r--r--lib/libc/sys/munmap.27
-rw-r--r--lib/libc/sys/pipe.27
-rw-r--r--lib/libc/sys/quotactl.25
-rw-r--r--lib/libc/sys/rename.26
-rw-r--r--lib/libc/sys/revoke.25
-rw-r--r--lib/libc/sys/rmdir.24
-rw-r--r--lib/libc/sys/sched_yield.27
-rw-r--r--lib/libc/sys/semop.26
-rw-r--r--lib/libc/sys/sendfile.26
-rw-r--r--lib/libc/sys/setgroups.24
-rw-r--r--lib/libc/sys/setregid.25
-rw-r--r--lib/libc/sys/shmctl.26
-rw-r--r--lib/libc/sys/sigaction.25
-rw-r--r--lib/libc/sys/sigaltstack.25
-rw-r--r--lib/libc/sys/sigpending.25
-rw-r--r--lib/libc/sys/sigprocmask.25
-rw-r--r--lib/libc/sys/socketpair.22
-rw-r--r--lib/libc/sys/symlink.25
-rw-r--r--lib/libc/sys/undelete.25
-rw-r--r--lib/libc/sys/unlink.25
58 files changed, 58 insertions, 243 deletions
diff --git a/lib/libc/compat-43/killpg.2 b/lib/libc/compat-43/killpg.2
index c8c218caa407..13b8f06fac8a 100644
--- a/lib/libc/compat-43/killpg.2
+++ b/lib/libc/compat-43/killpg.2
@@ -66,10 +66,7 @@ the sender must be the super-user.
As a single special case the continue signal SIGCONT may be sent
to any process that is a descendant of the current process.
.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned. Otherwise,
-a value of -1 is returned and the global variable
-.Va errno
-is set to indicate the error.
+.Rv -std killpg
.Sh ERRORS
.Fn Killpg
will fail and no signal will be sent if:
diff --git a/lib/libc/compat-43/sigvec.2 b/lib/libc/compat-43/sigvec.2
index 841d37ab8a68..77dfb67ef977 100644
--- a/lib/libc/compat-43/sigvec.2
+++ b/lib/libc/compat-43/sigvec.2
@@ -256,10 +256,7 @@ flag is not available in
.Bx 4.2 ,
hence it should not be used if backward compatibility is needed.
.Sh RETURN VALUES
-A 0 value indicated that the call succeeded. A \-1 return value
-indicates an error occurred and
-.Va errno
-is set to indicated the reason.
+.Rv -std sigvec
.Sh ERRORS
.Fn Sigvec
will fail and no new signal handler will be installed if one
diff --git a/lib/libc/gen/msgctl.3 b/lib/libc/gen/msgctl.3
index 3e25f79ffdc7..3d1d55a09a91 100644
--- a/lib/libc/gen/msgctl.3
+++ b/lib/libc/gen/msgctl.3
@@ -166,11 +166,7 @@ effective gid can match either
or
.Va msg_perm.gid .
.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned.
-Otherwise, -1 is
-returned and the global variable
-.Va errno
-is set to indicate the error.
+.Rv -std msgctl
.Sh ERRORS
.Fn msgctl
will fail if:
diff --git a/lib/libc/gen/msgsnd.3 b/lib/libc/gen/msgsnd.3
index ede8ff4a5351..51c39781cb74 100644
--- a/lib/libc/gen/msgsnd.3
+++ b/lib/libc/gen/msgsnd.3
@@ -121,10 +121,7 @@ is set to the pid of the calling process.
is set to the current time.
.El
.Sh RETURN VALUES
-Upon successful completion, 0 is returned.
-Otherwise, -1 is returned and
-.Va errno
-is set to indicate the error.
+.Rv -std msgsnd
.Sh ERRORS
.Fn msgsnd
will fail if:
diff --git a/lib/libc/gen/raise.3 b/lib/libc/gen/raise.3
index 2177fa4a0c2e..e2d82efa2813 100644
--- a/lib/libc/gen/raise.3
+++ b/lib/libc/gen/raise.3
@@ -55,10 +55,7 @@ function sends the signal
.Fa sig
to the current process.
.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned.
-Otherwise, a value of \-1 is returned and the global variable
-.Va errno
-is set to indicate the error.
+.Rv -std raise
.Sh ERRORS
The
.Fn raise
diff --git a/lib/libc/gen/sem_destroy.3 b/lib/libc/gen/sem_destroy.3
index 0de46913728b..29e9bd86c8b5 100644
--- a/lib/libc/gen/sem_destroy.3
+++ b/lib/libc/gen/sem_destroy.3
@@ -49,12 +49,7 @@ After a successful call to
is unuseable until re-initialized by another call to
.Fn sem_init .
.Sh RETURN VALUES
-If successful,
-.Fn sem_destroy
-returns 0. Otherwise, -1 is returned and
-.Va errno
-is set to indicate the type of
-error.
+.Rv -std sem_destroy
.Sh ERRORS
.Fn sem_destroy
will fail if:
diff --git a/lib/libc/gen/sem_getvalue.3 b/lib/libc/gen/sem_getvalue.3
index 3ee947af7ad8..98674e6c79ee 100644
--- a/lib/libc/gen/sem_getvalue.3
+++ b/lib/libc/gen/sem_getvalue.3
@@ -49,12 +49,7 @@ as of the time that the call to
.Fn sem_getvalue
is actually run.
.Sh RETURN VALUES
-If successful,
-.Fn sem_getvalue
-returns 0. Otherwise, -1 is returned and
-.Va errno
-is set to indicate the type of
-error.
+.Rv -std sem_getvalue
.Sh ERRORS
.Fn sem_getvalue
will fail if:
diff --git a/lib/libc/gen/sem_init.3 b/lib/libc/gen/sem_init.3
index 5f43c08e3789..87068adf0038 100644
--- a/lib/libc/gen/sem_init.3
+++ b/lib/libc/gen/sem_init.3
@@ -63,12 +63,7 @@ and
is no longer valid after a successful call to
.Fa sem_destroy .
.Sh RETURN VALUES
-If successful,
-.Fn sem_init
-returns 0. Otherwise, -1 is returned and
-.Va errno
-is set to indicate the type of
-error.
+.Rv -std sem_init
.Sh ERRORS
.Fn sem_init
will fail if:
diff --git a/lib/libc/gen/sem_post.3 b/lib/libc/gen/sem_post.3
index 0c8dea4934ef..bc0a031204bf 100644
--- a/lib/libc/gen/sem_post.3
+++ b/lib/libc/gen/sem_post.3
@@ -52,12 +52,7 @@ the semaphore will be allowed to return from
.Fn sem_post
is signal-reentrant and may be called within signal handlers.
.Sh RETURN VALUES
-If successful,
-.Fn sem_post
-returns 0. Otherwise, -1 is returned and
-.Va errno
-is set to indicate the type of
-error.
+.Rv -std sem_post
.Sh ERRORS
.Fn sem_post
will fail if:
diff --git a/lib/libc/gen/uname.3 b/lib/libc/gen/uname.3
index 0ad18d888554..9a9d5fe27d8a 100644
--- a/lib/libc/gen/uname.3
+++ b/lib/libc/gen/uname.3
@@ -69,11 +69,7 @@ Version level of the operating system.
Machine hardware platform.
.El
.Sh RETURN VALUES
-If
-.Fn uname
-is successful, 0 is returned, otherwise, -1 is returned and
-.Va errno
-is set appropriately.
+.Rv -std uname
.Sh ERRORS
The
.Fn uname
diff --git a/lib/libc/i386/sys/i386_vm86.2 b/lib/libc/i386/sys/i386_vm86.2
index 3c85ade2953e..185b537ea116 100644
--- a/lib/libc/i386/sys/i386_vm86.2
+++ b/lib/libc/i386/sys/i386_vm86.2
@@ -78,13 +78,7 @@ with the correct machine context for vm86, and with the
.Em PSL_VM
bit set. Control returns to the process upon delivery of a signal.
.Sh RETURN VALUES
-Upon successful completion,
-.Fn i386_vm86
-will return the value of 0.
-Otherwise, a value of -1 is returned and the global
-variable
-.Va errno
-is set to indicate the error.
+.Rv -std i386_vm86
.Sh ERRORS
.Fn i386_vm86
will fail if:
diff --git a/lib/libc/posix1e/acl_free.3 b/lib/libc/posix1e/acl_free.3
index f45c6b38e5fe..db185af9c836 100644
--- a/lib/libc/posix1e/acl_free.3
+++ b/lib/libc/posix1e/acl_free.3
@@ -50,10 +50,7 @@ or
support for POSIX.1e interfaces and features is still under
development at this time.
.Sh RETURN VALUES
-In the event of success, 0 is returned. In the event of failure, -1 is
-returned, and
-.Va errno
-is set to indicate the error.
+.Rv -std acl_free
.Sh ERRORS
If any of the following conditions occur, the
.Fn acl_free
diff --git a/lib/libc/posix1e/cap_clear.3 b/lib/libc/posix1e/cap_clear.3
index 5f305cb7abae..fbe8952a8786 100644
--- a/lib/libc/posix1e/cap_clear.3
+++ b/lib/libc/posix1e/cap_clear.3
@@ -52,10 +52,7 @@ implementation shall be cleared.
support for POSIX.1e interfaces and features is still under
development at this time.
.Sh RETURN VALUES
-Upon successful completion, the function shall return a value of zero.
-Otherwise, a value of -1 shall be returned and
-.Va errno
-shall be set to indicate the error.
+.Rv -std cap_clear
.Sh ERRORS
If any of the following conditions occur, the
.Fn cap_clear
diff --git a/lib/libc/posix1e/cap_free.3 b/lib/libc/posix1e/cap_free.3
index 3f6e192607ad..aed8587c04e6 100644
--- a/lib/libc/posix1e/cap_free.3
+++ b/lib/libc/posix1e/cap_free.3
@@ -57,10 +57,7 @@ function.
support for POSIX.1e interfaces and features is still under
development at this time.
.Sh RETURN VALUES
-Upon successful completion, the function shall return a value of zero.
-Otherwise, a value of -1 shall be returned and
-.Va errno
-set to indicate the error.
+.Rv -std cap_free
.Sh ERRORS
If any of the following conditions occur, the
.Fn cap_free
diff --git a/lib/libc/posix1e/cap_get_flag.3 b/lib/libc/posix1e/cap_get_flag.3
index 1f8ab201dd23..2493fdad8acd 100644
--- a/lib/libc/posix1e/cap_get_flag.3
+++ b/lib/libc/posix1e/cap_get_flag.3
@@ -56,10 +56,7 @@ and place it into the location pointed to by
support for POSIX.1e interfaces and features is still under
development at this time.
.Sh RETURN VALUES
-Upon successful completion, the function shall return a value of zero.
-Otherwise, a value of -1 shall be returned and
-.Va errno
-set to indicate the error.
+.Rv -std cap_get_flag
.Sh ERRORS
If any of the following conditions occur, the
.Fn cap_get_flag
diff --git a/lib/libc/stdio/remove.3 b/lib/libc/stdio/remove.3
index a79219f8e5c8..c463a5558af3 100644
--- a/lib/libc/stdio/remove.3
+++ b/lib/libc/stdio/remove.3
@@ -63,12 +63,7 @@ is the equivalent of
Otherwise, it is the equivalent of
.Fn unlink "path" .
.Sh RETURN VALUES
-Upon successful completion,
-.Fn remove
-returns 0.
-Otherwise, \-1 is returned and the global variable
-.Va errno
-is set to indicate the error.
+.Rv -std remove
.Sh ERRORS
The
.Fn remove
diff --git a/lib/libc/stdlib/radixsort.3 b/lib/libc/stdlib/radixsort.3
index 90a52c66aa56..04b2007a4533 100644
--- a/lib/libc/stdlib/radixsort.3
+++ b/lib/libc/stdlib/radixsort.3
@@ -108,10 +108,7 @@ These functions are variants of most-significant-byte radix sorting; in
particular, see D.E. Knuth's Algorithm R and section 5.2.5, exercise 10.
They take linear time relative to the number of bytes in the strings.
.Sh RETURN VALUES
-Upon successful completion 0 is returned.
-Otherwise, \-1 is returned and the global variable
-.Va errno
-is set to indicate the error.
+.Rv -std radixsort
.Sh ERRORS
.Bl -tag -width Er
.It Bq Er EINVAL
diff --git a/lib/libc/sys/adjtime.2 b/lib/libc/sys/adjtime.2
index 359b7ac1b439..f6a005171d50 100644
--- a/lib/libc/sys/adjtime.2
+++ b/lib/libc/sys/adjtime.2
@@ -84,10 +84,7 @@ The call
.Fn adjtime
is restricted to the super-user.
.Sh RETURN VALUES
-A return value of 0 indicates that the call succeeded.
-A return value of -1 indicates that an error occurred, and in this
-case an error code is stored in the global variable
-.Va errno .
+.Rv -std adjtime
.Sh ERRORS
.Fn Adjtime
will fail if:
diff --git a/lib/libc/sys/bind.2 b/lib/libc/sys/bind.2
index 56ab9a53cc33..7024168d74f1 100644
--- a/lib/libc/sys/bind.2
+++ b/lib/libc/sys/bind.2
@@ -86,10 +86,7 @@ Before returning,
unlocks
.Fa s .
.Sh RETURN VALUES
-If the bind is successful, a 0 value is returned.
-A return value of -1 indicates an error, which is
-further specified in the global
-.Va errno .
+.Rv -std bind
.Sh ERRORS
The
.Fn bind
diff --git a/lib/libc/sys/close.2 b/lib/libc/sys/close.2
index 98c35e07bf89..6a6fb0f53f63 100644
--- a/lib/libc/sys/close.2
+++ b/lib/libc/sys/close.2
@@ -123,10 +123,7 @@ Before returning,
unlocks
.Fa d .
.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned.
-Otherwise, a value of -1 is returned and the global integer variable
-.Va errno
-is set to indicate the error.
+.Rv -std close
.Sh ERRORS
.Fn Close
will fail if:
diff --git a/lib/libc/sys/connect.2 b/lib/libc/sys/connect.2
index 54adbb2d174a..eb1c6182cfb8 100644
--- a/lib/libc/sys/connect.2
+++ b/lib/libc/sys/connect.2
@@ -96,10 +96,7 @@ Before returning,
unlocks
.Va s .
.Sh RETURN VALUES
-If the connection or binding succeeds, 0 is returned.
-Otherwise a -1 is returned, and a more specific error
-code is stored in
-.Va errno .
+.Rv -std connect
.Sh ERRORS
The
.Fn connect
diff --git a/lib/libc/sys/flock.2 b/lib/libc/sys/flock.2
index 5e9ebf6bc4a6..d890bedadcc9 100644
--- a/lib/libc/sys/flock.2
+++ b/lib/libc/sys/flock.2
@@ -134,10 +134,7 @@ Before returning,
unlocks
.Fa fd .
.Sh RETURN VALUES
-Zero is returned if the operation was successful;
-on an error a -1 is returned and an error code is left in
-the global location
-.Va errno .
+.Rv -std flock
.Sh ERRORS
The
.Fn flock
diff --git a/lib/libc/sys/fsync.2 b/lib/libc/sys/fsync.2
index f689c30b6417..33a0167c06b4 100644
--- a/lib/libc/sys/fsync.2
+++ b/lib/libc/sys/fsync.2
@@ -78,8 +78,7 @@ Before returning,
unlocks
.Fa fd .
.Sh RETURN VALUES
-A 0 value is returned on success. A -1 value indicates
-an error.
+.Rv -std fsync
.Sh ERRORS
The
.Fn fsync
diff --git a/lib/libc/sys/getfh.2 b/lib/libc/sys/getfh.2
index d0ec2ede2d0f..422c1f6fb814 100644
--- a/lib/libc/sys/getfh.2
+++ b/lib/libc/sys/getfh.2
@@ -52,10 +52,7 @@ in the file handle pointed to by
.Fa fhp .
This system call is restricted to the superuser.
.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned.
-Otherwise, -1 is returned and the global variable
-.Va errno
-is set to indicate the error.
+.Rv -std getfh
.Sh ERRORS
.Fn Getfh
fails if one or more of the following are true:
diff --git a/lib/libc/sys/getpeername.2 b/lib/libc/sys/getpeername.2
index c409cea0b79e..28d7a92e18cd 100644
--- a/lib/libc/sys/getpeername.2
+++ b/lib/libc/sys/getpeername.2
@@ -80,7 +80,7 @@ Before returning,
unlocks
.Fa s .
.Sh RETURN VALUES
-A 0 is returned if the call succeeds, -1 if it fails.
+.Rv -std getpeername
.Sh ERRORS
The call succeeds unless:
.Bl -tag -width Er
diff --git a/lib/libc/sys/getrusage.2 b/lib/libc/sys/getrusage.2
index 2d973cbbf6ec..80e119791297 100644
--- a/lib/libc/sys/getrusage.2
+++ b/lib/libc/sys/getrusage.2
@@ -152,11 +152,7 @@ account only for real
I/O; data supplied by the caching mechanism is charged only
to the first process to read or write the data.
.Sh RETURN VALUES
-Upon successful completion,
-.Fn getrusage
-returns 0. Otherwise, a value of -1 is returned and
-.Va errno
-is set to indicate the error.
+.Rv -std getrusage
.Sh ERRORS
The
.Fn getrusage
diff --git a/lib/libc/sys/getsockname.2 b/lib/libc/sys/getsockname.2
index afaa86ba5b13..e5b2c3c5048c 100644
--- a/lib/libc/sys/getsockname.2
+++ b/lib/libc/sys/getsockname.2
@@ -78,7 +78,7 @@ Before returning,
unlocks
.Fa fd .
.Sh RETURN VALUES
-A 0 is returned if the call succeeds, -1 if it fails.
+.Rv -std getsockname
.Sh ERRORS
The call succeeds unless:
.Bl -tag -width Er
diff --git a/lib/libc/sys/kill.2 b/lib/libc/sys/kill.2
index 23bacb05d5a8..1e27caf570ea 100644
--- a/lib/libc/sys/kill.2
+++ b/lib/libc/sys/kill.2
@@ -106,10 +106,7 @@ is equal to the absolute value of the process number.
This is a variant of
.Xr killpg 2 .
.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned.
-Otherwise, a value of -1 is returned and
-.Va errno
-is set to indicate the error.
+.Rv -std kill
.Sh ERRORS
.Fn Kill
will fail and no signal will be sent if:
diff --git a/lib/libc/sys/ktrace.2 b/lib/libc/sys/ktrace.2
index fcbf46eee376..e903ff273b19 100644
--- a/lib/libc/sys/ktrace.2
+++ b/lib/libc/sys/ktrace.2
@@ -135,10 +135,7 @@ The type specific records are defined in the
.Aq Pa sys/ktrace.h
include file.
.Sh RETURN VALUES
-On successful completion a value of 0 is returned.
-Otherwise, a value of -1 is returned and
-.Va errno
-is set to show the error.
+.Rv -std ktrace
.Sh ERRORS
.Fn Ktrace
will fail if:
diff --git a/lib/libc/sys/link.2 b/lib/libc/sys/link.2
index baea6ebf4ff2..9c126c94bb06 100644
--- a/lib/libc/sys/link.2
+++ b/lib/libc/sys/link.2
@@ -80,10 +80,7 @@ must be in the same file system.
.Fa name1
may not be a directory.
.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned. Otherwise,
-a value of -1 is returned and
-.Va errno
-is set to indicate the error.
+.Rv -std link
.Sh ERRORS
.Fn Link
will fail and no link will be created if:
diff --git a/lib/libc/sys/listen.2 b/lib/libc/sys/listen.2
index b77500a1a7fb..a9ab96bc6976 100644
--- a/lib/libc/sys/listen.2
+++ b/lib/libc/sys/listen.2
@@ -107,7 +107,7 @@ Before returning,
unlocks
.Fa s .
.Sh RETURN VALUES
-A 0 return value indicates success; -1 indicates an error.
+.Rv -std listen
.Sh ERRORS
.Fn Listen
will fail if:
diff --git a/lib/libc/sys/madvise.2 b/lib/libc/sys/madvise.2
index e5d6a06b03f0..5ddfa96fad78 100644
--- a/lib/libc/sys/madvise.2
+++ b/lib/libc/sys/madvise.2
@@ -133,11 +133,7 @@ Region is not included in a core file.
Include region in a core file.
.El
.Sh RETURN VALUES
-Upon successful completion,
-.Fn madvise
-returns 0. Otherwise a value of -1 is returned and
-.Va errno
-is set to indicate the error.
+.Rv -std madvise
.Sh ERRORS
The
.Fn madvise
diff --git a/lib/libc/sys/minherit.2 b/lib/libc/sys/minherit.2
index 265d6d27fb5e..96f0ac6754c0 100644
--- a/lib/libc/sys/minherit.2
+++ b/lib/libc/sys/minherit.2
@@ -56,11 +56,7 @@ Not all implementations will guarantee that the inheritance characteristic
can be set on a page basis;
the granularity of changes may be as large as an entire region.
.Sh RETURN VALUES
-Upon successful completion,
-.Fn minherit
-returns 0. Otherwise, a value of -1 is returned and
-.Va errno
-is set to indicate the error.
+.Rv -std minherit
.Sh ERRORS
The
.Fn minherit
diff --git a/lib/libc/sys/mkdir.2 b/lib/libc/sys/mkdir.2
index 5db20748f172..25fad1ebef34 100644
--- a/lib/libc/sys/mkdir.2
+++ b/lib/libc/sys/mkdir.2
@@ -58,9 +58,7 @@ The directory's owner ID is set to the process's effective user ID.
The directory's group ID is set to that of the parent directory in
which it is created.
.Sh RETURN VALUES
-A 0 return value indicates success. A -1 return value
-indicates an error, and an error code is stored in
-.Va errno .
+.Rv -std mkdir
.Sh ERRORS
.Fn Mkdir
will fail and no directory will be created if:
diff --git a/lib/libc/sys/mkfifo.2 b/lib/libc/sys/mkfifo.2
index 2a606cbb68dd..c711690083a6 100644
--- a/lib/libc/sys/mkfifo.2
+++ b/lib/libc/sys/mkfifo.2
@@ -60,9 +60,7 @@ The fifo's owner ID is set to the process's effective user ID.
The fifo's group ID is set to that of the parent directory in
which it is created.
.Sh RETURN VALUES
-A 0 return value indicates success. A -1 return value
-indicates an error, and an error code is stored in
-.Va errno .
+.Rv -std mkfifo
.Sh ERRORS
.Fn Mkfifo
will fail and no fifo will be created if:
diff --git a/lib/libc/sys/mknod.2 b/lib/libc/sys/mknod.2
index 27d48b09f741..a81c1aaad9e5 100644
--- a/lib/libc/sys/mknod.2
+++ b/lib/libc/sys/mknod.2
@@ -64,10 +64,7 @@ is ignored.
.Fn Mknod
requires super-user privileges.
.Sh RETURN VALUES
-Upon successful completion a value of 0 is returned.
-Otherwise, a value of -1 is returned and
-.Va errno
-is set to indicate the error.
+.Rv -std mknod
.Sh ERRORS
.Fn Mknod
will fail and the file will be not created if:
diff --git a/lib/libc/sys/mprotect.2 b/lib/libc/sys/mprotect.2
index 7f46d241c839..fe8df3039d49 100644
--- a/lib/libc/sys/mprotect.2
+++ b/lib/libc/sys/mprotect.2
@@ -54,12 +54,7 @@ changes the specified pages to have protection
Not all implementations will guarantee protection on a page basis;
the granularity of protection changes may be as large as an entire region.
.Sh RETURN VALUES
-Upon successful completion,
-.Fn mprotect
-returns 0. Otherwise a value of -1 is returned
-and
-.Va errno
-is set to indicate the error.
+.Rv -std mprotect
.Sh ERRORS
The
.Fn mprotect
diff --git a/lib/libc/sys/msync.2 b/lib/libc/sys/msync.2
index 38fda84c9b5c..9adc3acd919a 100644
--- a/lib/libc/sys/msync.2
+++ b/lib/libc/sys/msync.2
@@ -72,9 +72,7 @@ MS_SYNC Perform synchronous writes
MS_INVALIDATE Invalidate all cached data
.Ed
.Sh RETURN VALUES
-If any errors occur, -1 is returned and errno is set to indicate the
-error.
-Otherwise, a 0 value is returned.
+.Rv -std msync
.Sh ERRORS
.Fn msync
will fail if:
diff --git a/lib/libc/sys/munmap.2 b/lib/libc/sys/munmap.2
index 230ec4bdccf8..164473002934 100644
--- a/lib/libc/sys/munmap.2
+++ b/lib/libc/sys/munmap.2
@@ -53,12 +53,7 @@ deletes the mappings for the specified address range,
and causes further references to addresses within the range
to generate invalid memory references.
.Sh RETURN VALUES
-Upon successful completion,
-.Fn munmap
-returns zero.
-Otherwise, a value of -1 is returned and
-.Va errno
-is set to indicate the error.
+.Rv -std munmap
.Sh ERRORS
.Fn Munmap
will fail if:
diff --git a/lib/libc/sys/pipe.2 b/lib/libc/sys/pipe.2
index 5bbc5634b697..52f0f98bece8 100644
--- a/lib/libc/sys/pipe.2
+++ b/lib/libc/sys/pipe.2
@@ -88,12 +88,7 @@ portable to older systems, so it is recommended to use the convention
for using the endpoints in the traditional manner when using a
pipe in one direction.
.Sh RETURN VALUES
-On successful creation of the pipe, zero is returned.
-Otherwise,
-a value of -1 is returned and the variable
-.Va errno
-set to indicate the
-error.
+.Rv -std pipe
.Sh ERRORS
The
.Fn pipe
diff --git a/lib/libc/sys/quotactl.2 b/lib/libc/sys/quotactl.2
index 6fe4a094decc..9aa5a481efe6 100644
--- a/lib/libc/sys/quotactl.2
+++ b/lib/libc/sys/quotactl.2
@@ -151,10 +151,7 @@ and
parameters are ignored.
.El
.Sh RETURN VALUES
-A successful call returns 0,
-otherwise the value -1 is returned and the global variable
-.Va errno
-indicates the reason for the failure.
+.Rv -std quotactl
.Sh ERRORS
A
.Fn quotactl
diff --git a/lib/libc/sys/rename.2 b/lib/libc/sys/rename.2
index 41edfafc3d14..8d5523a1c00a 100644
--- a/lib/libc/sys/rename.2
+++ b/lib/libc/sys/rename.2
@@ -98,11 +98,7 @@ not the file or directory to which it points.
.\"Hard links to directories should be
.\"replaced by symbolic links by the system administrator.
.Sh RETURN VALUES
-A 0 value is returned if the operation succeeds, otherwise
-.Fn rename
-returns -1 and the global variable
-.Va errno
-indicates the reason for the failure.
+.Rv -std rename
.Sh ERRORS
.Fn Rename
will fail and neither of the argument files will be
diff --git a/lib/libc/sys/revoke.2 b/lib/libc/sys/revoke.2
index d89d50c8e164..8b6b01d58489 100644
--- a/lib/libc/sys/revoke.2
+++ b/lib/libc/sys/revoke.2
@@ -73,10 +73,7 @@ device files.
It is normally used to prepare a terminal device for a new login session,
preventing any access by a previous user of the terminal.
.Sh RETURN VALUES
-A 0 value indicated that the call succeeded. A \-1 return value
-indicates an error occurred and
-.Va errno
-is set to indicated the reason.
+.Rv -std revoke
.Sh ERRORS
Access to the named file is revoked unless one of the following:
.Bl -tag -width Er
diff --git a/lib/libc/sys/rmdir.2 b/lib/libc/sys/rmdir.2
index d637c93e1681..373b185800c9 100644
--- a/lib/libc/sys/rmdir.2
+++ b/lib/libc/sys/rmdir.2
@@ -55,9 +55,7 @@ than
and
.Ql \&.. .
.Sh RETURN VALUES
-A 0 is returned if the remove succeeds; otherwise a -1 is
-returned and an error code is stored in the global location
-.Va errno .
+.Rv -std rmdir
.Sh ERRORS
The named file is removed unless:
.Bl -tag -width Er
diff --git a/lib/libc/sys/sched_yield.2 b/lib/libc/sys/sched_yield.2
index ee5c123fbb49..2d8240cd8f53 100644
--- a/lib/libc/sys/sched_yield.2
+++ b/lib/libc/sys/sched_yield.2
@@ -41,12 +41,7 @@ The
function forces the running process to relinquish the processor until it
again becomes the head of its process list. It takes no arguments.
.Sh RETURN VALUES
-The
-.Fn sched_yield
-function will return zero if it completes successfully, or it
-will return a value of -1 and set
-.Va errno
-to indicate the error.
+.Rv -std sched_yield
.Sh ERRORS
On failure
.Va errno
diff --git a/lib/libc/sys/semop.2 b/lib/libc/sys/semop.2
index 3ead1dc08511..7f18510d89c6 100644
--- a/lib/libc/sys/semop.2
+++ b/lib/libc/sys/semop.2
@@ -163,11 +163,7 @@ for each semaphore is added to the semaphore's value. This can
be used to insure that a resource is released if a process terminates
unexpectedly.
.Sh RETURN VALUES
-On success,
-.Fn semop
-returns 0; otherwise, -1 is returned and
-.Va errno
-is set to indicate the error.
+.Rv -std semop
.Sh ERRORS
.Fn Semop
will fail if:
diff --git a/lib/libc/sys/sendfile.2 b/lib/libc/sys/sendfile.2
index e9d17b862dc2..24296c2d041d 100644
--- a/lib/libc/sys/sendfile.2
+++ b/lib/libc/sys/sendfile.2
@@ -132,11 +132,7 @@ unlocks
and
.Fa s .
.Sh RETURN VALUES
-Upon successful completion,
-.Fn sendfile
-returns 0. Otherwise a -1 is returned and the global variable
-.Va errno
-is set to indicate the error.
+.Rv -std sendfile
.Sh ERRORS
.Bl -tag -width Er
.It Bq Er EBADF
diff --git a/lib/libc/sys/setgroups.2 b/lib/libc/sys/setgroups.2
index 668b3dc6a49f..3ba324dd3cf0 100644
--- a/lib/libc/sys/setgroups.2
+++ b/lib/libc/sys/setgroups.2
@@ -60,9 +60,7 @@ as defined in
.Pp
Only the super-user may set new groups.
.Sh RETURN VALUES
-A 0 value is returned on success, -1 on error, with
-an error code stored in
-.Va errno .
+.Rv -std setgroups
.Sh ERRORS
The
.Fn setgroups
diff --git a/lib/libc/sys/setregid.2 b/lib/libc/sys/setregid.2
index 358920bcc7c7..196534933a0d 100644
--- a/lib/libc/sys/setregid.2
+++ b/lib/libc/sys/setregid.2
@@ -74,10 +74,7 @@ the standard
.Fn setgid
function is preferred.
.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned. Otherwise,
-a value of -1 is returned and
-.Va errno
-is set to indicate the error.
+.Rv -std setregid
.Sh ERRORS
.Bl -tag -width Er
.It Bq Er EPERM
diff --git a/lib/libc/sys/shmctl.2 b/lib/libc/sys/shmctl.2
index 9288bb5ce547..e3ab92cf296d 100644
--- a/lib/libc/sys/shmctl.2
+++ b/lib/libc/sys/shmctl.2
@@ -109,11 +109,7 @@ struct shmid_ds {
};
.Ed
.Sh RETURN VALUES
-Upon successful completion,
-.Fn shmctl
-returns 0. Otherwise, it returns -1 and
-.Va errno
-is set to indicate the error.
+.Rv -std shmctl
.Sh ERRORS
.Fn Shmctl
will fail if:
diff --git a/lib/libc/sys/sigaction.2 b/lib/libc/sys/sigaction.2
index 762aa45206ab..877445e60f12 100644
--- a/lib/libc/sys/sigaction.2
+++ b/lib/libc/sys/sigaction.2
@@ -448,10 +448,7 @@ This protects against the side effect of
.Va errno
being set by functions called from inside the signal handler.
.Sh RETURN VALUES
-A 0 value indicated that the call succeeded. A \-1 return value
-indicates an error occurred and
-.Va errno
-is set to indicated the reason.
+.Rv -std sigaction
.Sh EXAMPLES
There are three possible prototypes the handler may match:
.Bl -tag -offset indent -width short
diff --git a/lib/libc/sys/sigaltstack.2 b/lib/libc/sys/sigaltstack.2
index d69b34b7e03d..e39b8930636b 100644
--- a/lib/libc/sys/sigaltstack.2
+++ b/lib/libc/sys/sigaltstack.2
@@ -133,10 +133,7 @@ are not ``grown'' automatically as is done for the normal stack.
If the stack overflows and this space is not protected
unpredictable results may occur.
.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned.
-Otherwise, a value of -1 is returned and
-.Va errno
-is set to indicate the error.
+.Rv -std sigaltstack
.Sh ERRORS
.Fn Sigaltstack
will fail and the signal stack context will remain unchanged
diff --git a/lib/libc/sys/sigpending.2 b/lib/libc/sys/sigpending.2
index 361a91898199..8ab927bb2dc1 100644
--- a/lib/libc/sys/sigpending.2
+++ b/lib/libc/sys/sigpending.2
@@ -57,10 +57,7 @@ Signals may be pending because they are currently masked,
or transiently before delivery (although the latter case is not
normally detectable).
.Sh RETURN VALUES
-A 0 value indicated that the call succeeded. A \-1 return value
-indicates an error occurred and
-.Va errno
-is set to indicated the reason.
+.Rv -std sigpending
.Sh ERRORS
.Fn sigpending
will fail if:
diff --git a/lib/libc/sys/sigprocmask.2 b/lib/libc/sys/sigprocmask.2
index ff60beb2291d..a7bf788883a0 100644
--- a/lib/libc/sys/sigprocmask.2
+++ b/lib/libc/sys/sigprocmask.2
@@ -96,10 +96,7 @@ or
.Dv SIGSTOP
to be blocked.
.Sh RETURN VALUES
-A 0 value indicated that the call succeeded. A -1 return value
-indicates an error occurred and
-.Va errno
-is set to indicated the reason.
+.Rv -std sigprocmask
.Sh ERRORS
The
.Fn sigprocmask
diff --git a/lib/libc/sys/socketpair.2 b/lib/libc/sys/socketpair.2
index 1c5a15f391b2..875aea04b37a 100644
--- a/lib/libc/sys/socketpair.2
+++ b/lib/libc/sys/socketpair.2
@@ -62,7 +62,7 @@ and
.Fa sv Ns [1] .
The two sockets are indistinguishable.
.Sh RETURN VALUES
-A 0 is returned if the call succeeds, -1 if it fails.
+.Rv -std socketpair
.Sh ERRORS
The call succeeds unless:
.Bl -tag -width Er
diff --git a/lib/libc/sys/symlink.2 b/lib/libc/sys/symlink.2
index ea3ca385b755..175ce9fecd89 100644
--- a/lib/libc/sys/symlink.2
+++ b/lib/libc/sys/symlink.2
@@ -58,10 +58,7 @@ used in creating the symbolic link).
Either name may be an arbitrary path name; the files need not
be on the same file system.
.Sh RETURN VALUES
-Upon successful completion, a zero value is returned.
-If an error occurs, the error code is stored in
-.Va errno
-and a -1 value is returned.
+.Rv -std symlink
.Sh ERRORS
The symbolic link succeeds unless:
.Bl -tag -width Er
diff --git a/lib/libc/sys/undelete.2 b/lib/libc/sys/undelete.2
index b9ba8af6e11b..2fae4fc8cca0 100644
--- a/lib/libc/sys/undelete.2
+++ b/lib/libc/sys/undelete.2
@@ -61,10 +61,7 @@ Eventually, the
functionality may be expanded to other filesystems able to recover
deleted files such as the log-structured filesystem.
.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned.
-Otherwise, a value of -1 is returned and
-.Va errno
-is set to indicate the error.
+.Rv -std undelete
.Sh ERRORS
The
.Fn undelete
diff --git a/lib/libc/sys/unlink.2 b/lib/libc/sys/unlink.2
index c547825a0ad3..2b5e3cb725f2 100644
--- a/lib/libc/sys/unlink.2
+++ b/lib/libc/sys/unlink.2
@@ -62,10 +62,7 @@ all references to it have been closed.
.Fa path
may not be a directory.
.Sh RETURN VALUES
-Upon successful completion, a value of 0 is returned.
-Otherwise, a value of -1 is returned and
-.Va errno
-is set to indicate the error.
+.Rv -std unlink
.Sh ERRORS
The
.Fn unlink