diff options
author | yar <yar@FreeBSD.org> | 2001-08-09 13:32:13 +0000 |
---|---|---|
committer | yar <yar@FreeBSD.org> | 2001-08-09 13:32:13 +0000 |
commit | 27b7f2d4e7c579a6e7166e44aab5e0ed6a66a032 (patch) | |
tree | 251e4417acf32d993acd2d301d7ead7122c562cf /lib/libc/sys | |
parent | 4b2c641db11eb15a0fbaa9f9507781a0cec98421 (diff) | |
download | FreeBSD-src-27b7f2d4e7c579a6e7166e44aab5e0ed6a66a032.zip FreeBSD-src-27b7f2d4e7c579a6e7166e44aab5e0ed6a66a032.tar.gz |
Use the ``.Rv -std'' mdoc(7) macro in appropriate cases.
Reviewed by: ru
Diffstat (limited to 'lib/libc/sys')
41 files changed, 41 insertions, 160 deletions
diff --git a/lib/libc/sys/adjtime.2 b/lib/libc/sys/adjtime.2 index 359b7ac..f6a0051 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 56ab9a5..7024168 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 98c35e0..6a6fb0f 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 54adbb2..eb1c618 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 5e9ebf6..d890bed 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 f689c30..33a0167 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 d0ec2ed..422c1f6 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 c409cea..28d7a92 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 2d973cb..80e1197 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 afaa86b..e5b2c3c 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 23bacb0..1e27caf 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 fcbf46e..e903ff2 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 baea6eb..9c126c9 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 b77500a..a9ab96b 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 e5d6a06..5ddfa96 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 265d6d27..96f0ac6 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 5db2074..25fad1e 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 2a606cb..c711690 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 27d48b0..a81c1aa 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 7f46d24..fe8df30 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 38fda84..9adc3ac 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 230ec4b..1644730 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 5bbc563..52f0f98 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 6fe4a09..9aa5a48 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 41edfaf..8d5523a 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 d89d50c..8b6b01d 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 d637c93..373b185 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 ee5c123..2d8240c 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 3ead1dc..7f18510 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 e9d17b8..24296c2 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 668b3dc..3ba324d 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 358920b..1965349 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 9288bb5..e3ab92c 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 762aa45..877445e 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 d69b34b..e39b893 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 361a918..8ab927b 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 ff60beb..a7bf788 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 1c5a15f..875aea0 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 ea3ca38..175ce9f 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 b9ba8af..2fae4fc 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 c547825..2b5e3cb 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 |