]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
Various pages: Standardize wording around setting of 'errno' on error
authorMichael Kerrisk <mtk.manpages@gmail.com>
Thu, 7 Jan 2021 06:50:50 +0000 (07:50 +0100)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Thu, 7 Jan 2021 13:27:27 +0000 (14:27 +0100)
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>
47 files changed:
man2/add_key.2
man2/futex.2
man2/getpriority.2
man2/inotify_rm_watch.2
man2/ioctl_userfaultfd.2
man2/mmap.2
man2/open_by_handle_at.2
man2/perfmonctl.2
man2/pidfd_getfd.2
man2/pidfd_open.2
man2/pidfd_send_signal.2
man2/poll.2
man2/pread.2
man2/readahead.2
man2/request_key.2
man2/sched_setattr.2
man2/seccomp.2
man2/shmop.2
man2/sysinfo.2
man2/write.2
man3/bindresvport.3
man3/ctime.3
man3/dirfd.3
man3/duplocale.3
man3/fpathconf.3
man3/get_phys_pages.3
man3/getlogin.3
man3/getspnam.3
man3/hsearch.3
man3/inet_net_pton.3
man3/newlocale.3
man3/posix_memalign.3
man3/pthread_mutex_consistent.3
man3/random.3
man3/random_r.3
man3/scandir.3
man3/setenv.3
man3/shm_open.3
man3/siginterrupt.3
man3/sigsetops.3
man3/strdup.3
man3/sysconf.3
man3/tempnam.3
man3/timegm.3
man3/uselocale.3
man3/usleep.3
man3/wcsdup.3

index 0d136e4aa4d2be8b55169969119773ced9976627..3b41580a24ce3d296edd825010f6d55956eb64f3 100644 (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
index 04df4896fbc12fa294dad5ff23f9c1c1505c9b6f..5f41abaa04969730757aec68eb85ec1ae1601d14 100644 (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:
index 4646ca5332ec154fc81c4d4c50c1a3d8070d9b00..e3fbeb4f3078f7c9a1022dcb4486168f3c19ab4b 100644 (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 ()
index eae66d59d1ea5e5a74811276c79eca3994222cf2..459642ebc29e9447ad49fc236626744b2c83edac 100644 (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
index 14dba424332c3a86932ad5a48dabf50417fe823d..945badf089cf861a32b42f1d488b6503f78e5e91 100644 (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
index 30170fbedfd915d085fe2e7e26f30b2c80328e03..b44a8f1b786f61897bff9a09270d759f81c5a147 100644 (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
index 56228a1ae0d7cfabe97e3792461d64fd1b9ea975..eb2ef1459fe0bf601ec14c60d77b27a55a57790b 100644 (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
index 8c010069d993f5babe1d833b2a59c3fae6a8a8fa..1c0197190fc18f5e34c5bcd0d490a26faf483c88 100644 (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.
index 1a1319aaec4ef1f8b7e90d46a8a4ef415902a1f0..636aa46cb1b091513cdb6f5948349bfffa3f4196 100644 (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
index b6a3215625cf416230e27b03c7997e5a0b112e23..51418d3dbc9dfd0637dfe21b462ed881a7c409af 100644 (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
index da10c7d0f4a73c8745f9442286194054bf13207d..02b8fac4b92e1ad1bb5b65d05a13f11060647361 100644 (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
index b45e37f8a5932e551b415fc70fd5aeecb68dc154..f32051522c3d28ac50ad83eabc6f5c2c5f807445 100644 (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
index 9f2cabaa7a3b9ca8c0bf21459b489c2a7364a9cb..0204671428d32b6ae7af14eb831e4f29f17b14ec 100644 (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
index c551d877148f551601c2b8a9b795230e3dc47674..4f606770e798af505388719fcc2877e70638b624 100644 (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
index 997c221b7e409e287214d9826fd4d24ceae8a6d2..89bde01c361d0d690ee5460317c2f5064b171cb4 100644 (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
index 3d255f6227e66053ee3cce2a5e3e154e3520a236..ecbdbffc4aad1100d87b73e5c9ffad39a87af2cd 100644 (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
index 181e89bfc2502a5203c81ef08b69b6e4219230d4..cd1256a1968b800d5c39df0c95b092ac9fdcce6f 100644 (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:
index 111f2f4039b47f11c2b44b88d57fb4d0c08eaa4c..941ea66866fad713ade9d820afa2301ea6b61cb7 100644 (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 ()
index ab58dae885af0a102de54b7703ff7846184725c2..eedf0755ff12981cf4b4748ee41278d3d1ffd58a 100644 (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
index 37b251d9f82e39559d7b6465172e284318c13fa6..b6c42df8a7498356dbee70e36209d0d858f7b490 100644 (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 ()
index 9bcecd047a054b424f0fde4c78ddada9238db58e..805a784cd526b302e00be367633fa3d7badff563 100644 (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
index b06640a61050e9f9b3279347fdaee4f42dc212d0..3aeb1c6920edc472e197e3202155a75f8f1f3e48 100644 (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
index e38831ba0c24257abf2b7405f47fd17ce445fa3d..7a9ad353fee10ea8ff1690ff01ef848b6e81631b 100644 (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
index 751ab5bf52409844d17b7ded9d28bb7db90c5d00..bf473c28adbd8df435facb02cb79d51b0a46959b 100644 (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
index 7cca6f256fcb30bae35c91cff2b863303c89fe74..e51d0643cad58948f59c634f5758fa2daf3f61ba 100644 (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
index 72bdae72c0fbfb642d11e34e2f54d888fe315d6c..55935128f919ebd1d270a3586f6a56bcea9b7a18 100644 (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
index cebb2232d1fe46fd9ba946bfe76a6e8f06ddb51a..f3d4e01a2d9afb4d5488f7a88a1f2f92209c3bc7 100644 (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
index d7d781c76800c60e14aa78b081e3959f7ee528f5..a92627fc41dc7039b5a1fb54e1bc41eec018b355 100644 (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.
index a4d1a6422d49b50be94be23c2c978724395d0827..a2b00af2150b470c44c738ae8ad62df23e727686 100644 (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
index 94329ff8b707358a79ba97da4e9ed8e3570ed5d6..4c16ea6fe464eeeac140500c5f0fa5dc2c244bad 100644 (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
index 82f651911fecd621819d1f475926ec9845fcfdf8..d95c14ba9a12c2aefad4eedf5dd02d93805b34e0 100644 (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
index a7d5d185b070333af308265521391f9d41dcff08..d063f8932f6933665f14b34dba4b6454b6ce90b5 100644 (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
index 2e56e44e0e0d818cefb2161822e141972bbbc7d1..13a21631207b3f79871eb2de56d0866797fee82d 100644 (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
index d77a9b200cd046067ee2868d4f3837851289dd82..639e9a18c671dc9fefef3be6439cdd0ba6986527 100644 (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
index 7be96e59dc6c6ba6a492d96b5754ee80402967e4..5363e5e781e8f17d183c2a7b68c9485dcfdf7df4 100644 (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
index 8a11720d5544dd6a587e96a858cfac3803b26738..328c70f690b49fe03c36c3cc0076b842ed50d429 100644 (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 ()
index 40f15d1e42ae761ac2de4459b4aa89ae01d727f0..2d61cda6de0a71d9fc315869341b8e0f670e0418 100644 (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
index 7f18dc1587ab4e150b2fa22639acda3fdc7ae309..580e03cf6c570e8126518f87ebe66b70bffc162a 100644 (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:
index 79b7c153b593750a5ea2d4325829404a1761a314..bd4bb366146c2d018fcab032459f80c7ec9df548 100644 (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
index 6f3389029e29fe1b872ba9d08d9adfb2f8877e10..4c0af1e2af85385d166d0834151493b59f58621a 100644 (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
index 8900a26d75a05e89549664415550b2b55d14bf0f..65ee22df91956f70bdf38e02bb51c558e62465e0 100644 (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
index 8c256421d605453ead40f8743af4de537dfa713b..05eda466cf4552cb249e35623a528a603f5b936a 100644 (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
index cb66c953a7b05704d15b4e851a46791745b80d14..1c450f375b3bb435d502cd7235392e05a47d2c65 100644 (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
index de0fdc63463220d103c2ccd372f8cd3d834f7fcc..7779e85cc1ed8ed189fbe3145cd5fd82d9a0075a 100644 (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
index 2018646efbff73570d792cb73a58462ec003b5bd..a3007313bbdf71124c7166c4607dbf59447d5021 100644 (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
index 7eaeb820ae2bbd757fd711e0ad0e9822f2af0179..519c5f0f2d65327354c589ca1cfa30f30c1b0822 100644 (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
index 823cc18ba4eef6d513c12937d692fb28ca5ee92e..a6e7a8328728d479a76b9be56d9d3e06c8451852 100644 (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