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:
Michael Kerrisk 2021-01-07 07:50:50 +01:00
parent 3cf2958737
commit 855d489a7f
47 changed files with 56 additions and 56 deletions

View File

@ -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

View File

@ -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:

View File

@ -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 ()

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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:

View File

@ -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 ()

View File

@ -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

View File

@ -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 ()

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 ()

View File

@ -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

View File

@ -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:

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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