From 49e10846a684d8faa456046705ad6d3d7bce8f4c Mon Sep 17 00:00:00 2001 From: uwe Date: Sun, 4 Dec 2022 11:25:08 +0000 Subject: [PATCH] lib: Mark up error names in man pages with .Er --- lib/libc/compat-43/sigpause.3 | 4 ++-- lib/libc/compat-43/sigvec.3 | 4 ++-- lib/libc/gen/glob.3 | 6 +++--- lib/libc/gen/popen.3 | 4 ++-- lib/libc/gen/siginterrupt.3 | 4 ++-- lib/libc/gen/sysctl.3 | 5 +++-- lib/libc/gen/vis.3 | 4 ++-- lib/libc/net/rcmd.3 | 4 ++-- lib/libc/stdlib/reallocarray.3 | 4 ++-- lib/libc/stdlib/strtod.3 | 6 +++--- lib/libc/sys/_lwp_create.2 | 5 +++-- lib/libc/sys/fcntl.2 | 4 ++-- lib/libc/sys/wait.2 | 4 ++-- lib/libc/time/tzset.3 | 4 ++-- lib/libm/man/acos.3 | 5 +++-- lib/libm/man/acosh.3 | 5 +++-- lib/libm/man/atanh.3 | 5 +++-- lib/libm/man/cosh.3 | 5 +++-- lib/libm/man/sqrt.3 | 5 +++-- lib/libossaudio/ossaudio.3 | 6 +++--- lib/librmt/rmtops.3 | 6 ++++-- lib/libutil/sockaddr_snprintf.3 | 4 ++-- 22 files changed, 56 insertions(+), 47 deletions(-) diff --git a/lib/libc/compat-43/sigpause.3 b/lib/libc/compat-43/sigpause.3 index 431ad501c7d9..26e9275bb204 100644 --- a/lib/libc/compat-43/sigpause.3 +++ b/lib/libc/compat-43/sigpause.3 @@ -26,7 +26,7 @@ .\" SUCH DAMAGE. .\" .\" from: @(#)sigpause.2 8.1 (Berkeley) 6/2/93 -.\" $NetBSD: sigpause.3,v 1.15 2003/08/07 16:42:40 agc Exp $ +.\" $NetBSD: sigpause.3,v 1.16 2022/12/04 11:25:08 uwe Exp $ .\" .Dd June 2, 1993 .Dt SIGPAUSE 3 @@ -59,7 +59,7 @@ signals are to be blocked. always terminates by being interrupted, returning -1 with .Va errno set to -.Dv EINTR . +.Er EINTR . .Sh SEE ALSO .Xr kill 2 , .Xr sigaction 2 , diff --git a/lib/libc/compat-43/sigvec.3 b/lib/libc/compat-43/sigvec.3 index 18c2a4c2cabd..3c9cda2c2d92 100644 --- a/lib/libc/compat-43/sigvec.3 +++ b/lib/libc/compat-43/sigvec.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: sigvec.3,v 1.26 2010/03/22 19:30:53 joerg Exp $ +.\" $NetBSD: sigvec.3,v 1.27 2022/12/04 11:25:08 uwe Exp $ .\" .\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -189,7 +189,7 @@ the call may be restarted, the call may return with a data transfer shorter than requested, or the call may be forced to terminate with the error -.Dv EINTR . +.Er EINTR . Interrupting of pending calls is requested by setting the .Dv SV_INTERRUPT diff --git a/lib/libc/gen/glob.3 b/lib/libc/gen/glob.3 index 748049955265..b5861a7d1842 100644 --- a/lib/libc/gen/glob.3 +++ b/lib/libc/gen/glob.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: glob.3,v 1.44 2019/05/29 01:21:33 christos Exp $ +.\" $NetBSD: glob.3,v 1.45 2022/12/04 11:25:08 uwe Exp $ .\" .\" Copyright (c) 1989, 1991, 1993, 1994 .\" The Regents of the University of California. All rights reserved. @@ -316,9 +316,9 @@ is not a directory, resulting in a call to .Fa errfunc . The error routine can suppress this action by testing for -.Dv ENOENT +.Er ENOENT and -.Dv ENOTDIR ; +.Er ENOTDIR ; however, the .Dv GLOB_ERR flag will still cause an immediate diff --git a/lib/libc/gen/popen.3 b/lib/libc/gen/popen.3 index c68c8bfd6522..a50e32bb6617 100644 --- a/lib/libc/gen/popen.3 +++ b/lib/libc/gen/popen.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: popen.3,v 1.24 2022/03/27 00:32:15 gutteridge Exp $ +.\" $NetBSD: popen.3,v 1.25 2022/12/04 11:25:08 uwe Exp $ .\" .\" Copyright (c) 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -163,7 +163,7 @@ command, if has already been .Dq pclosed , setting errno to -.Dv ESRCH , +.Er ESRCH , or if .Xr wait4 2 returns an error, preserving the errno returned by diff --git a/lib/libc/gen/siginterrupt.3 b/lib/libc/gen/siginterrupt.3 index f03283316849..ce7ce627d86a 100644 --- a/lib/libc/gen/siginterrupt.3 +++ b/lib/libc/gen/siginterrupt.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: siginterrupt.3,v 1.11 2003/08/07 16:42:56 agc Exp $ +.\" $NetBSD: siginterrupt.3,v 1.12 2022/12/04 11:25:08 uwe Exp $ .\" .\" Copyright (c) 1985, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -60,7 +60,7 @@ and no data has been transferred, the system call will return \-1 with the global variable .Va errno set to -.Dv EINTR . +.Er EINTR . Interrupted system calls that have started transferring data will return the amount of data actually transferred. System call interrupt is the signal behavior found on diff --git a/lib/libc/gen/sysctl.3 b/lib/libc/gen/sysctl.3 index 18766fd369df..d3c4e00a7f6d 100644 --- a/lib/libc/gen/sysctl.3 +++ b/lib/libc/gen/sysctl.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: sysctl.3,v 1.206 2019/09/15 07:01:13 wiz Exp $ +.\" $NetBSD: sysctl.3,v 1.207 2022/12/04 11:25:08 uwe Exp $ .\" .\" Copyright (c) 1993 .\" The Regents of the University of California. All rights reserved. @@ -105,7 +105,8 @@ and that location gives the amount of data copied after a successful call. If the amount of data available is greater than the size of the buffer supplied, the call supplies as much data as fits in the buffer provided -and returns with the error code ENOMEM. +and returns with the error code +.Er ENOMEM . If the old value is not desired, .Fa oldp and diff --git a/lib/libc/gen/vis.3 b/lib/libc/gen/vis.3 index 24cd2654d027..421f7d69827f 100644 --- a/lib/libc/gen/vis.3 +++ b/lib/libc/gen/vis.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: vis.3,v 1.49 2017/08/05 20:22:29 wiz Exp $ +.\" $NetBSD: vis.3,v 1.50 2022/12/04 11:25:08 uwe Exp $ .\" .\" Copyright (c) 1989, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -179,7 +179,7 @@ and functions return \-1 and set .Va errno to -.Dv ENOSPC . +.Er ENOSPC . The .Fn strenvisx function takes an additional argument, diff --git a/lib/libc/net/rcmd.3 b/lib/libc/net/rcmd.3 index 516f81576f1f..70ad7d9d91de 100644 --- a/lib/libc/net/rcmd.3 +++ b/lib/libc/net/rcmd.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: rcmd.3,v 1.29 2022/12/04 01:29:32 uwe Exp $ +.\" $NetBSD: rcmd.3,v 1.30 2022/12/04 11:25:08 uwe Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -275,7 +275,7 @@ They return \-1 on error with the global value .Va errno set according to the reason for failure. The error code -.Dv EAGAIN +.Er EAGAIN is overloaded to mean ``All network ports in use.'' .Sh SEE ALSO .Xr rcmd 1 , diff --git a/lib/libc/stdlib/reallocarray.3 b/lib/libc/stdlib/reallocarray.3 index 86889f098d4d..7ad7f344787a 100644 --- a/lib/libc/stdlib/reallocarray.3 +++ b/lib/libc/stdlib/reallocarray.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: reallocarray.3,v 1.6 2022/11/27 20:17:20 gutteridge Exp $ +.\" $NetBSD: reallocarray.3,v 1.7 2022/12/04 11:25:08 uwe Exp $ .\" .\" Copyright (c) 2015 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -66,7 +66,7 @@ if there was overflow or if failed setting .Va errno to -.Dv ENOMEM +.Er ENOMEM or preserving the value from .Xr realloc 3 . .Sh SEE ALSO diff --git a/lib/libc/stdlib/strtod.3 b/lib/libc/stdlib/strtod.3 index 595373d6b1d0..f8be2a6ad350 100644 --- a/lib/libc/stdlib/strtod.3 +++ b/lib/libc/stdlib/strtod.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: strtod.3,v 1.29 2016/11/07 21:52:36 riastradh Exp $ +.\" $NetBSD: strtod.3,v 1.30 2022/12/04 11:25:08 uwe Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -159,7 +159,7 @@ plus or minus or .Dv HUGE_VALL is returned (according to the return type and sign of the value), and -.Dv ERANGE +.Er ERANGE is stored in .Va errno . .Pp @@ -167,7 +167,7 @@ If the correct value is too small in magnitude to be represented normally with full precision .Pq Sq underflow , the closest subnormal value, or zero, is returned, and -.Dv ERANGE +.Er ERANGE is stored in .Va errno . .Sh EXAMPLES diff --git a/lib/libc/sys/_lwp_create.2 b/lib/libc/sys/_lwp_create.2 index 2bf2a3eeccc7..1af13e7d092d 100644 --- a/lib/libc/sys/_lwp_create.2 +++ b/lib/libc/sys/_lwp_create.2 @@ -1,4 +1,4 @@ -.\" $NetBSD: _lwp_create.2,v 1.9 2021/08/22 20:18:39 andvar Exp $ +.\" $NetBSD: _lwp_create.2,v 1.10 2022/12/04 11:25:09 uwe Exp $ .\" .\" Copyright (c) 2003 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -52,7 +52,8 @@ disabled. If this context specifies invalid register values (for example privilege escalation by setting machine dependent bits forbidden for user processes), or does not specify cpu register values (uc_flags does not have the -_UC_CPU bit set), the call will fail and errno will be set to EINVAL. +_UC_CPU bit set), the call will fail and errno will be set to +.Er EINVAL . .Pp The following flags affect the creation of the new LWP: .Bl -tag -width LWP_SUSPENDED diff --git a/lib/libc/sys/fcntl.2 b/lib/libc/sys/fcntl.2 index 44ca9f7d1f68..460106d0b99b 100644 --- a/lib/libc/sys/fcntl.2 +++ b/lib/libc/sys/fcntl.2 @@ -1,4 +1,4 @@ -.\" $NetBSD: fcntl.2,v 1.47 2021/07/28 11:29:59 wiz Exp $ +.\" $NetBSD: fcntl.2,v 1.48 2022/12/04 11:25:09 uwe Exp $ .\" .\" Copyright (c) 1983, 1993 .\" The Regents of the University of California. All rights reserved. @@ -340,7 +340,7 @@ the first entry found in the cache is returned. may fail if the corresponding entry has been evicted from the LRU .Xr namei 9 cache and return -.Dv ENOENT . +.Er ENOENT . .It File descriptors that don't point to vnodes are not handled, as well as symbolic links since there is currently no way to obtain diff --git a/lib/libc/sys/wait.2 b/lib/libc/sys/wait.2 index b69ebc00793a..2933d0173db3 100644 --- a/lib/libc/sys/wait.2 +++ b/lib/libc/sys/wait.2 @@ -1,4 +1,4 @@ -.\" $NetBSD: wait.2,v 1.41 2022/10/17 18:41:06 jschauma Exp $ +.\" $NetBSD: wait.2,v 1.42 2022/12/04 11:25:09 uwe Exp $ .\" .\" Copyright (c) 1980, 1991, 1993, 1994 .\" The Regents of the University of California. All rights reserved. @@ -373,7 +373,7 @@ To avoid hanging indefinitely in such a case these functions return \-1 with .Dv errno set to -.Dv EINVAL . +.Er EINVAL . .Pp If .Fa rusage diff --git a/lib/libc/time/tzset.3 b/lib/libc/time/tzset.3 index b44bccb2abcb..c9f7aa3961ef 100644 --- a/lib/libc/time/tzset.3 +++ b/lib/libc/time/tzset.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: tzset.3,v 1.43 2022/08/23 14:54:50 christos Exp $ +.\" $NetBSD: tzset.3,v 1.44 2022/12/04 11:25:09 uwe Exp $ .Dd Auguset 23, 2021 .Dt TZSET 3 .Os @@ -105,7 +105,7 @@ If there is no match, then is returned and .Va errno is set to -.Dv ESRCH . +.Er ESRCH . The .Fn tzset function acts like diff --git a/lib/libm/man/acos.3 b/lib/libm/man/acos.3 index 065084b431ad..b3f3d4ba0240 100644 --- a/lib/libm/man/acos.3 +++ b/lib/libm/man/acos.3 @@ -26,7 +26,7 @@ .\" SUCH DAMAGE. .\" .\" from: @(#)acos.3 5.1 (Berkeley) 5/2/91 -.\" $NetBSD: acos.3,v 1.18 2017/07/03 21:32:50 wiz Exp $ +.\" $NetBSD: acos.3,v 1.19 2022/12/04 11:25:09 uwe Exp $ .\" .Dd January 29, 2013 .Dt ACOS 3 @@ -65,7 +65,8 @@ and .\" POSIX_MODE set the global variable .Va errno -to EDOM. +to +.Er EDOM . .\" SYSV_MODE .\" call .\" .Xr matherr 3 . diff --git a/lib/libm/man/acosh.3 b/lib/libm/man/acosh.3 index f809b7fc2fa1..5b6b3cd74475 100644 --- a/lib/libm/man/acosh.3 +++ b/lib/libm/man/acosh.3 @@ -26,7 +26,7 @@ .\" SUCH DAMAGE. .\" .\" from: @(#)acosh.3 5.2 (Berkeley) 5/6/91 -.\" $NetBSD: acosh.3,v 1.17 2014/09/19 16:02:58 wiz Exp $ +.\" $NetBSD: acosh.3,v 1.18 2022/12/04 11:25:09 uwe Exp $ .\" .Dd January 29, 2013 .Dt ACOSH 3 @@ -65,7 +65,8 @@ and .Fn acoshl "x" return NaN and set the global variable .Va errno -to EDOM. +to +.Er EDOM . .\" SVR4_MODE .\" call .\" .Xr matherr 3 . diff --git a/lib/libm/man/atanh.3 b/lib/libm/man/atanh.3 index 6179d062d0da..6402da264864 100644 --- a/lib/libm/man/atanh.3 +++ b/lib/libm/man/atanh.3 @@ -26,7 +26,7 @@ .\" SUCH DAMAGE. .\" .\" from: @(#)atanh.3 5.2 (Berkeley) 5/6/91 -.\" $NetBSD: atanh.3,v 1.17 2014/09/19 16:02:58 wiz Exp $ +.\" $NetBSD: atanh.3,v 1.18 2022/12/04 11:25:09 uwe Exp $ .\" .Dd January 29, 2013 .Dt ATANH 3 @@ -65,7 +65,8 @@ and .\" POSIX_MODE return +inf, -inf or NaN, and sets the global variable .Va errno -to EDOM. +to +.Er EDOM . .\" SYSV_MODE .\" call .\" .Xr matherr 3 . diff --git a/lib/libm/man/cosh.3 b/lib/libm/man/cosh.3 index 3e9832d16707..3d1d0f16c413 100644 --- a/lib/libm/man/cosh.3 +++ b/lib/libm/man/cosh.3 @@ -26,7 +26,7 @@ .\" SUCH DAMAGE. .\" .\" from: @(#)cosh.3 5.1 (Berkeley) 5/2/91 -.\" $NetBSD: cosh.3,v 1.15 2003/08/07 16:44:47 agc Exp $ +.\" $NetBSD: cosh.3,v 1.16 2022/12/04 11:25:09 uwe Exp $ .\" .Dd May 2, 1991 .Dt COSH 3 @@ -58,7 +58,8 @@ and .\" POSIX_MODE return Inf and sets the global variable .Va errno -to ERANGE. +to +.Er ERANGE . .\" SYSV_MODE .\" call .\" .Xr matherr 3 . diff --git a/lib/libm/man/sqrt.3 b/lib/libm/man/sqrt.3 index d01ea26be66e..50cb194c6fb8 100644 --- a/lib/libm/man/sqrt.3 +++ b/lib/libm/man/sqrt.3 @@ -26,7 +26,7 @@ .\" SUCH DAMAGE. .\" .\" from: @(#)sqrt.3 6.4 (Berkeley) 5/6/91 -.\" $NetBSD: sqrt.3,v 1.14 2013/11/19 19:24:33 joerg Exp $ +.\" $NetBSD: sqrt.3,v 1.15 2022/12/04 11:25:09 uwe Exp $ .\" .Dd November 19, 2013 .Dt SQRT 3 @@ -81,7 +81,8 @@ and .\" POSIX_MODE set the global variable .Va errno -to EDOM. +to +.Er EDOM . .\" SYSV_MODE .\" call .\" .Xr matherr 3 . diff --git a/lib/libossaudio/ossaudio.3 b/lib/libossaudio/ossaudio.3 index 83cc90451c15..19b6bf886dc6 100644 --- a/lib/libossaudio/ossaudio.3 +++ b/lib/libossaudio/ossaudio.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: ossaudio.3,v 1.27 2020/10/20 07:52:04 wiz Exp $ +.\" $NetBSD: ossaudio.3,v 1.28 2022/12/04 11:25:09 uwe Exp $ .\" .\" Copyright (c) 1997, 2020 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -134,11 +134,11 @@ The emulation only covers there are other differences as well. E.g., on a write that would block in non-blocking mode Linux returns -.Dv EINTR +.Er EINTR whereas .Nx 1.3 returns -.Dv EAGAIN . +.Er EAGAIN . .It The emulation uses a #define for .Fn ioctl diff --git a/lib/librmt/rmtops.3 b/lib/librmt/rmtops.3 index 9aa1442617e1..b1b77042868f 100644 --- a/lib/librmt/rmtops.3 +++ b/lib/librmt/rmtops.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: rmtops.3,v 1.16 2022/12/04 01:29:33 uwe Exp $ +.\" $NetBSD: rmtops.3,v 1.17 2022/12/04 11:25:09 uwe Exp $ .\" .Dd October 16, 2001 .Dt RMTOPS 3 @@ -130,7 +130,9 @@ remote tape library .Sh RETURN VALUES Several of these routines will return \-1 and set .Va errno -to EOPNOTSUPP, if they are given a remote file name or a file descriptor +to +.Er EOPNOTSUPP , +if they are given a remote file name or a file descriptor on an open remote file (e.g., .Fn rmtdup ) . .Sh SEE ALSO diff --git a/lib/libutil/sockaddr_snprintf.3 b/lib/libutil/sockaddr_snprintf.3 index e26ed47be8ec..67b1b51c9e11 100644 --- a/lib/libutil/sockaddr_snprintf.3 +++ b/lib/libutil/sockaddr_snprintf.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: sockaddr_snprintf.3,v 1.8 2013/06/07 17:23:26 christos Exp $ +.\" $NetBSD: sockaddr_snprintf.3,v 1.9 2022/12/04 11:25:09 uwe Exp $ .\" .\" Copyright (c) 2004 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -176,7 +176,7 @@ If the address family is not supported, returns \-1 and sets .Va errno to -.Dv EAFNOSUPPORT . +.Er EAFNOSUPPORT . For .Dv AF_INET and