mirror of https://github.com/mkerrisk/man-pages
Various pages: Standardize wording around setting of 'errno' on error
In the RETURN VALUE sections, a number of different wordings are used in to describe the fact that 'errno' is set on error. There's no reason for the difference in wordings, since the same thing is being described in each case. Switch to a standard wording that is the same as FreeBSD and similar to the wording used in POSIX.1. In this change, "to indicate the cause of the error" is changed to "to indicate the error". Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
3cf2958737
commit
855d489a7f
|
@ -147,7 +147,7 @@ On success,
|
|||
returns the serial number of the key it created or updated.
|
||||
On error, \-1 is returned and
|
||||
.I errno
|
||||
is set to indicate the cause of the error.
|
||||
is set to indicate the error.
|
||||
.SH ERRORS
|
||||
.TP
|
||||
.B EACCES
|
||||
|
|
|
@ -1320,7 +1320,7 @@ was invoked via
|
|||
.BR syscall (2)),
|
||||
all operations return \-1 and set
|
||||
.I errno
|
||||
to indicate the cause of the error.
|
||||
to indicate the error.
|
||||
.PP
|
||||
The return value on success depends on the operation,
|
||||
as described in the following list:
|
||||
|
|
|
@ -123,7 +123,7 @@ On success,
|
|||
returns the calling thread's nice value, which may be a negative number.
|
||||
On error, it returns \-1 and sets
|
||||
.I errno
|
||||
to indicate the cause of the error.
|
||||
to indicate the error.
|
||||
.PP
|
||||
Since a successful call to
|
||||
.BR getpriority ()
|
||||
|
|
|
@ -53,7 +53,7 @@ On success,
|
|||
returns zero.
|
||||
On error, \-1 is returned and
|
||||
.I errno
|
||||
is set to indicate the cause of the error.
|
||||
is set to indicate the error.
|
||||
.SH ERRORS
|
||||
.TP
|
||||
.B EBADF
|
||||
|
|
|
@ -235,7 +235,7 @@ This
|
|||
operation returns 0 on success.
|
||||
On error, \-1 is returned and
|
||||
.I errno
|
||||
is set to indicate the cause of the error.
|
||||
is set to indicate the error.
|
||||
Possible errors include:
|
||||
.TP
|
||||
.B EFAULT
|
||||
|
@ -333,7 +333,7 @@ This
|
|||
operation returns 0 on success.
|
||||
On error, \-1 is returned and
|
||||
.I errno
|
||||
is set to indicate the cause of the error.
|
||||
is set to indicate the error.
|
||||
Possible errors include:
|
||||
.\" FIXME Is the following error list correct?
|
||||
.\"
|
||||
|
@ -386,7 +386,7 @@ This
|
|||
operation returns 0 on success.
|
||||
On error, \-1 is returned and
|
||||
.I errno
|
||||
is set to indicate the cause of the error.
|
||||
is set to indicate the error.
|
||||
Possible errors include:
|
||||
.TP
|
||||
.B EINVAL
|
||||
|
@ -466,7 +466,7 @@ operation returns 0 on success.
|
|||
In this case, the entire area was copied.
|
||||
On error, \-1 is returned and
|
||||
.I errno
|
||||
is set to indicate the cause of the error.
|
||||
is set to indicate the error.
|
||||
Possible errors include:
|
||||
.TP
|
||||
.B EAGAIN
|
||||
|
@ -570,7 +570,7 @@ operation returns 0 on success.
|
|||
In this case, the entire area was zeroed.
|
||||
On error, \-1 is returned and
|
||||
.I errno
|
||||
is set to indicate the cause of the error.
|
||||
is set to indicate the error.
|
||||
Possible errors include:
|
||||
.TP
|
||||
.B EAGAIN
|
||||
|
@ -636,7 +636,7 @@ This
|
|||
operation returns 0 on success.
|
||||
On error, \-1 is returned and
|
||||
.I errno
|
||||
is set to indicate the cause of the error.
|
||||
is set to indicate the error.
|
||||
Possible errors include:
|
||||
.TP
|
||||
.B EINVAL
|
||||
|
|
|
@ -497,14 +497,14 @@ On error, the value
|
|||
.IR "(void\ *)\ \-1" )
|
||||
is returned, and
|
||||
.I errno
|
||||
is set to indicate the cause of the error.
|
||||
is set to indicate the error.
|
||||
.PP
|
||||
On success,
|
||||
.BR munmap ()
|
||||
returns 0.
|
||||
On failure, it returns \-1, and
|
||||
.I errno
|
||||
is set to indicate the cause of the error (probably to
|
||||
is set to indicate the error (probably to
|
||||
.BR EINVAL ).
|
||||
.SH ERRORS
|
||||
.TP
|
||||
|
|
|
@ -282,7 +282,7 @@ returns a file descriptor (a nonnegative integer).
|
|||
.PP
|
||||
In the event of an error, both system calls return \-1 and set
|
||||
.I errno
|
||||
to indicate the cause of the error.
|
||||
to indicate the error.
|
||||
.SH ERRORS
|
||||
.BR name_to_handle_at ()
|
||||
and
|
||||
|
|
|
@ -193,7 +193,7 @@ Reset PMC registers to default values.
|
|||
returns zero when the operation is successful.
|
||||
On error, \-1 is returned and
|
||||
.I errno
|
||||
is set to indicate the cause of the error.
|
||||
is set to indicate the error.
|
||||
.SH VERSIONS
|
||||
.BR perfmonctl ()
|
||||
is available since Linux 2.4.
|
||||
|
|
|
@ -74,7 +74,7 @@ On success,
|
|||
returns a file descriptor (a nonnegative integer).
|
||||
On error, \-1 is returned and
|
||||
.I errno
|
||||
is set to indicate the cause of the error.
|
||||
is set to indicate the error.
|
||||
.SH ERRORS
|
||||
.TP
|
||||
.B EBADF
|
||||
|
|
|
@ -53,7 +53,7 @@ On success,
|
|||
returns a file descriptor (a nonnegative integer).
|
||||
On error, \-1 is returned and
|
||||
.I errno
|
||||
is set to indicate the cause of the error.
|
||||
is set to indicate the error.
|
||||
.SH ERRORS
|
||||
.TP
|
||||
.B EINVAL
|
||||
|
|
|
@ -96,7 +96,7 @@ On success,
|
|||
returns 0.
|
||||
On error, \-1 is returned and
|
||||
.I errno
|
||||
is set to indicate the cause of the error.
|
||||
is set to indicate the error.
|
||||
.SH ERRORS
|
||||
.TP
|
||||
.B EBADF
|
||||
|
|
|
@ -354,7 +354,7 @@ before any file descriptors became read.
|
|||
.PP
|
||||
On error, \-1 is returned, and
|
||||
.I errno
|
||||
is set to indicate the cause of the error.
|
||||
is set to indicate the error.
|
||||
.SH ERRORS
|
||||
.TP
|
||||
.B EFAULT
|
||||
|
|
|
@ -89,7 +89,7 @@ and
|
|||
.PP
|
||||
On error, \-1 is returned and
|
||||
.I errno
|
||||
is set to indicate the cause of the error.
|
||||
is set to indicate the error.
|
||||
.SH ERRORS
|
||||
.BR pread ()
|
||||
can fail and set
|
||||
|
|
|
@ -68,7 +68,7 @@ On success,
|
|||
.BR readahead ()
|
||||
returns 0; on failure, \-1 is returned, with
|
||||
.I errno
|
||||
set to indicate the cause of the error.
|
||||
set to indicate the error.
|
||||
.SH ERRORS
|
||||
.TP
|
||||
.B EBADF
|
||||
|
|
|
@ -378,7 +378,7 @@ On success,
|
|||
returns the serial number of the key it found or caused to be created.
|
||||
On error, \-1 is returned and
|
||||
.I errno
|
||||
is set to indicate the cause of the error.
|
||||
is set to indicate the error.
|
||||
.SH ERRORS
|
||||
.TP
|
||||
.B EACCES
|
||||
|
|
|
@ -303,7 +303,7 @@ and
|
|||
return 0.
|
||||
On error, \-1 is returned, and
|
||||
.I errno
|
||||
is set to indicate the cause of the error.
|
||||
is set to indicate the error.
|
||||
.SH ERRORS
|
||||
.BR sched_getattr ()
|
||||
and
|
||||
|
|
|
@ -727,7 +727,7 @@ and
|
|||
.BR gettid (2).)
|
||||
On other errors, \-1 is returned, and
|
||||
.IR errno
|
||||
is set to indicate the cause of the error.
|
||||
is set to indicate the error.
|
||||
.SH ERRORS
|
||||
.BR seccomp ()
|
||||
can fail for the following reasons:
|
||||
|
|
|
@ -170,13 +170,13 @@ returns the address of the attached shared memory segment; on error,
|
|||
.I (void\ *)\ \-1
|
||||
is returned, and
|
||||
.I errno
|
||||
is set to indicate the cause of the error.
|
||||
is set to indicate the error.
|
||||
.PP
|
||||
On success,
|
||||
.BR shmdt ()
|
||||
returns 0; on error \-1 is returned, and
|
||||
.I errno
|
||||
is set to indicate the cause of the error.
|
||||
is set to indicate the error.
|
||||
.SH ERRORS
|
||||
When
|
||||
.BR shmat ()
|
||||
|
|
|
@ -104,7 +104,7 @@ On success,
|
|||
returns zero.
|
||||
On error, \-1 is returned, and
|
||||
.I errno
|
||||
is set to indicate the cause of the error.
|
||||
is set to indicate the error.
|
||||
.SH ERRORS
|
||||
.TP
|
||||
.B EFAULT
|
||||
|
|
|
@ -98,7 +98,7 @@ see NOTES for the upper limit on Linux.
|
|||
.SH RETURN VALUE
|
||||
On success, the number of bytes written is returned.
|
||||
On error, \-1 is returned, and \fIerrno\fP is set
|
||||
to indicate the cause of the error.
|
||||
to indicate the error.
|
||||
.PP
|
||||
Note that a successful
|
||||
.BR write ()
|
||||
|
|
|
@ -70,7 +70,7 @@ has no way to return the port number actually allocated.
|
|||
.BR bindresvport ()
|
||||
returns 0 on success; otherwise \-1 is returned and
|
||||
.I errno
|
||||
set to indicate the cause of the error.
|
||||
is set to indicate the error.
|
||||
.SH ERRORS
|
||||
.BR bindresvport ()
|
||||
can fail for any of the same reasons as
|
||||
|
|
|
@ -311,7 +311,7 @@ returns the value
|
|||
The remaining functions return NULL on error.
|
||||
On error,
|
||||
.I errno
|
||||
is set to indicate the cause of the error.
|
||||
is set to indicate the error.
|
||||
.SH ERRORS
|
||||
.TP
|
||||
.B EOVERFLOW
|
||||
|
|
|
@ -64,7 +64,7 @@ On success,
|
|||
returns a file descriptor (a nonnegative integer).
|
||||
On error, \-1 is returned, and
|
||||
.I errno
|
||||
is set to indicate the cause of the error.
|
||||
is set to indicate the error.
|
||||
.SH ERRORS
|
||||
POSIX.1-2008 specifies two errors,
|
||||
neither of which is returned by the current
|
||||
|
|
|
@ -66,7 +66,7 @@ On error, it returns
|
|||
.IR "(locale_t)\ 0",
|
||||
and sets
|
||||
.I errno
|
||||
to indicate the cause of the error.
|
||||
to indicate the error.
|
||||
.SH ERRORS
|
||||
.TP
|
||||
.B ENOMEM
|
||||
|
|
|
@ -176,7 +176,7 @@ The return value of these functions is one of the following:
|
|||
.IP * 3
|
||||
On error, \-1 is returned and
|
||||
.I errno
|
||||
is set to indicate the cause of the error
|
||||
is set to indicate the error
|
||||
(for example,
|
||||
.BR EINVAL ,
|
||||
indicating that
|
||||
|
|
|
@ -47,7 +47,7 @@ On success,
|
|||
these functions return a nonnegative value as given in DESCRIPTION.
|
||||
On failure, they return \-1 and set
|
||||
.I errno
|
||||
to indicate the cause of the error.
|
||||
to indicate the error.
|
||||
.SH ERRORS
|
||||
.TP
|
||||
.B ENOSYS
|
||||
|
|
|
@ -107,7 +107,7 @@ precisely because the user can set \fBLOGNAME\fP arbitrarily.
|
|||
returns a pointer to the username when successful,
|
||||
and NULL on failure, with
|
||||
.I errno
|
||||
set to indicate the cause of the error.
|
||||
set to indicate the error.
|
||||
.BR getlogin_r ()
|
||||
returns 0 when successful, and nonzero on failure.
|
||||
.SH ERRORS
|
||||
|
|
|
@ -208,7 +208,7 @@ are available or if an error occurs during processing.
|
|||
The functions which have \fIint\fP as the return value return 0 for
|
||||
success and \-1 for failure, with
|
||||
.I errno
|
||||
set to indicate the cause of the error.
|
||||
set to indicate the error.
|
||||
.PP
|
||||
For the nonreentrant functions, the return value may point to static area,
|
||||
and may be overwritten by subsequent calls to these functions.
|
||||
|
|
|
@ -175,7 +175,7 @@ and
|
|||
return nonzero on success.
|
||||
They return 0 on error, with
|
||||
.I errno
|
||||
set to indicate the cause of the error.
|
||||
set to indicate the error.
|
||||
.PP
|
||||
On success,
|
||||
.BR hsearch ()
|
||||
|
@ -189,7 +189,7 @@ cannot be found in the hash table.
|
|||
returns nonzero on success, and 0 on error.
|
||||
In the event of an error, these two functions set
|
||||
.I errno
|
||||
to indicate the cause of the error.
|
||||
to indicate the error.
|
||||
.SH ERRORS
|
||||
.BR hcreate_r ()
|
||||
and
|
||||
|
|
|
@ -125,7 +125,7 @@ On success,
|
|||
returns the number of bits in the network number.
|
||||
On error, it returns \-1, and
|
||||
.I errno
|
||||
is set to indicate the cause of the error.
|
||||
is set to indicate the error.
|
||||
.PP
|
||||
On success,
|
||||
.BR inet_net_ntop ()
|
||||
|
@ -133,7 +133,7 @@ returns
|
|||
.IR pres .
|
||||
On error, it returns NULL, and
|
||||
.I errno
|
||||
is set to indicate the cause of the error.
|
||||
is set to indicate the error.
|
||||
.SH ERRORS
|
||||
.TP
|
||||
.B EAFNOSUPPORT
|
||||
|
|
|
@ -181,7 +181,7 @@ returns
|
|||
.IR "(locale_t)\ 0",
|
||||
and sets
|
||||
.I errno
|
||||
to indicate the cause of the error.
|
||||
to indicate the error.
|
||||
.SH ERRORS
|
||||
.TP
|
||||
.B EINVAL
|
||||
|
|
|
@ -135,7 +135,7 @@ and
|
|||
.BR pvalloc ()
|
||||
return a pointer to the allocated memory on success.
|
||||
On error, NULL is returned, and \fIerrno\fP is set
|
||||
to indicate the cause of the error.
|
||||
to indicate the error.
|
||||
.PP
|
||||
.BR posix_memalign ()
|
||||
returns zero on success, or one of the error values listed in the
|
||||
|
|
|
@ -58,7 +58,7 @@ On success,
|
|||
.IR pthread_mutex_consistent ()
|
||||
returns 0.
|
||||
Otherwise,
|
||||
it returns a positive error number to indicate the cause of the error.
|
||||
it returns a positive error number to indicate the error.
|
||||
.SH ERRORS
|
||||
.TP
|
||||
.B EINVAL
|
||||
|
|
|
@ -138,7 +138,7 @@ On success,
|
|||
returns a pointer to the previous state array.
|
||||
On error, it returns NULL, with
|
||||
.I errno
|
||||
set to indicate the cause of the error.
|
||||
set to indicate the error.
|
||||
.SH ERRORS
|
||||
.TP
|
||||
.B EINVAL
|
||||
|
|
|
@ -127,7 +127,7 @@ or be the result of a previous call of
|
|||
All of these functions return 0 on success.
|
||||
On error, \-1 is returned, with
|
||||
.I errno
|
||||
set to indicate the cause of the error.
|
||||
set to indicate the error.
|
||||
.SH ERRORS
|
||||
.TP
|
||||
.B EINVAL
|
||||
|
|
|
@ -178,7 +178,7 @@ function returns the number of directory entries
|
|||
selected.
|
||||
On error, \-1 is returned, with
|
||||
.I errno
|
||||
set to indicate the cause of the error.
|
||||
set to indicate the error.
|
||||
.PP
|
||||
The
|
||||
.BR alphasort ()
|
||||
|
|
|
@ -107,7 +107,7 @@ and
|
|||
functions return zero on success,
|
||||
or \-1 on error, with
|
||||
.I errno
|
||||
set to indicate the cause of the error.
|
||||
set to indicate the error.
|
||||
.SH ERRORS
|
||||
.TP
|
||||
.B EINVAL
|
||||
|
|
|
@ -178,7 +178,7 @@ returns 0 on success, or \-1 on error.
|
|||
.SH ERRORS
|
||||
On failure,
|
||||
.I errno
|
||||
is set to indicate the cause of the error.
|
||||
is set to indicate the error.
|
||||
Values which may appear in
|
||||
.I errno
|
||||
include the following:
|
||||
|
|
|
@ -77,7 +77,7 @@ signal number
|
|||
.I sig
|
||||
is invalid, with
|
||||
.I errno
|
||||
set to indicate the cause of the error.
|
||||
set to indicate the error.
|
||||
.SH ERRORS
|
||||
.TP
|
||||
.B EINVAL
|
||||
|
|
|
@ -121,7 +121,7 @@ is not a member, and \-1 on error.
|
|||
.PP
|
||||
On error, these functions set
|
||||
.I errno
|
||||
to indicate the cause of the error.
|
||||
to indicate the error.
|
||||
.SH ERRORS
|
||||
.TP
|
||||
.B EINVAL
|
||||
|
|
|
@ -109,7 +109,7 @@ function returns a pointer to the duplicated
|
|||
string.
|
||||
It returns NULL if insufficient memory was available, with
|
||||
.I errno
|
||||
set to indicate the cause of the error.
|
||||
set to indicate the error.
|
||||
.SH ERRORS
|
||||
.TP
|
||||
.B ENOMEM
|
||||
|
|
|
@ -330,7 +330,7 @@ is one of the following:
|
|||
.IP * 3
|
||||
On error, \-1 is returned and
|
||||
.I errno
|
||||
is set to indicate the cause of the error
|
||||
is set to indicate the error
|
||||
(for example,
|
||||
.BR EINVAL ,
|
||||
indicating that
|
||||
|
|
|
@ -102,7 +102,7 @@ On success, the
|
|||
function returns a pointer to a unique temporary filename.
|
||||
It returns NULL if a unique name cannot be generated, with
|
||||
.I errno
|
||||
set to indicate the cause of the error.
|
||||
set to indicate the error.
|
||||
.SH ERRORS
|
||||
.TP
|
||||
.B ENOMEM
|
||||
|
|
|
@ -71,7 +71,7 @@ On error, they return the value
|
|||
.I (time_t)\ \-1
|
||||
and set
|
||||
.I errno
|
||||
to indicate the cause of the error.
|
||||
to indicate the error.
|
||||
.SH ERRORS
|
||||
.TP
|
||||
.B EOVERFLOW
|
||||
|
|
|
@ -81,7 +81,7 @@ On error, it returns
|
|||
.IR "(locale_t)\ 0" ,
|
||||
and sets
|
||||
.I errno
|
||||
to indicate the cause of the error.
|
||||
to indicate the error.
|
||||
.SH ERRORS
|
||||
.TP
|
||||
.B EINVAL
|
||||
|
|
|
@ -69,7 +69,7 @@ The
|
|||
function returns 0 on success.
|
||||
On error, \-1 is returned, with
|
||||
.I errno
|
||||
set to indicate the cause of the error.
|
||||
set to indicate the error.
|
||||
.SH ERRORS
|
||||
.TP
|
||||
.B EINTR
|
||||
|
|
|
@ -56,7 +56,7 @@ On success,
|
|||
returns a pointer to the new wide-character string.
|
||||
On error, it returns NULL, with
|
||||
.I errno
|
||||
set to indicate the cause of the error.
|
||||
set to indicate the error.
|
||||
.SH ERRORS
|
||||
.TP
|
||||
.B ENOMEM
|
||||
|
|
Loading…
Reference in New Issue