From 09b235db2af05a8108d7b79e7f164cefe370c221 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Fri, 22 Jun 2007 06:05:43 +0000 Subject: [PATCH] Format errno. --- man2/pciconfig_read.2 | 8 ++++++-- man2/recv.2 | 4 +++- man3/errno.3 | 14 +++++++------- man3/mpool.3 | 8 ++++++-- man3/strtol.3 | 3 ++- man7/ip.7 | 4 +++- 6 files changed, 27 insertions(+), 14 deletions(-) diff --git a/man2/pciconfig_read.2 b/man2/pciconfig_read.2 index 0a9a35b63..310a108cc 100644 --- a/man2/pciconfig_read.2 +++ b/man2/pciconfig_read.2 @@ -54,11 +54,15 @@ the IO base for PIO cycles, or the ISA holes if any. .TP .BR pciconfig_read () On success zero is returned. -On error, \-1 is returned and errno is set appropriately. +On error, \-1 is returned and +,I errno +is set appropriately. .TP .BR pciconfig_write () On success zero is returned. -On error, \-1 is returned and errno is set appropriately. +On error, \-1 is returned and +.I errno +is set appropriately. .TP .BR pciconfig_iobase () Returns information on locations of various I/O diff --git a/man2/recv.2 b/man2/recv.2 index 5d031485c..185d1cb8d 100644 --- a/man2/recv.2 +++ b/man2/recv.2 @@ -192,7 +192,9 @@ struct sockaddr *SO_EE_OFFENDER(struct sock_extended_err *); .in -0.25i .IP .B ee_errno -contains the errno number of the queued error. +contains the +.I errno +number of the queued error. .B ee_origin is the origin code of where the error originated. The other fields are protocol specific. diff --git a/man3/errno.3 b/man3/errno.3 index 7eb358bb4..7b657a8d8 100644 --- a/man3/errno.3 +++ b/man3/errno.3 @@ -38,26 +38,26 @@ errno \- number of last error The .I header file defines the integer variable -.BR errno , +.IR errno , which is set by system calls and some library functions in the event of an error to indicate what went wrong. Its value is significant only when the call returned an error (usually \-1), and a function that does succeed is allowed to change -.BR errno . +.IR errno . Sometimes, when \-1 is also a valid successful return value one has to zero -.B errno +.I errno before the call in order to detect possible errors. -\fBerrno\fR is defined by the ISO C standard to be a modifiable lvalue -of type \fIint\fR, and must not be explicitly declared; \fBerrno\fR +\fIerrno\fR is defined by the ISO C standard to be a modifiable lvalue +of type \fIint\fR, and must not be explicitly declared; \fIerrno\fR may be a macro. -\fBerrno\fR is thread-local; setting it in one thread +\fIerrno\fR is thread-local; setting it in one thread does not affect its value in any other thread. -Valid error numbers are all non-zero; \fBerrno\fR is never set to zero +Valid error numbers are all non-zero; \fIerrno\fR is never set to zero by any library function. All the error names specified by POSIX.1 must have distinct values, with the exception of diff --git a/man3/mpool.3 b/man3/mpool.3 index 4d17f4207..a86789991 100644 --- a/man3/mpool.3 +++ b/man3/mpool.3 @@ -126,13 +126,17 @@ If a new page can be allocated, a pointer to the page is returned and the page number is stored into the .I pgnoaddr address. -Otherwise, NULL is returned and errno is set. +Otherwise, NULL is returned and +.I errno +is set. .PP The function .BR mpool_get () takes a MPOOL pointer and a page number as arguments. If the page exists, a pointer to the page is returned. -Otherwise, NULL is returned and errno is set. +Otherwise, NULL is returned and +.I errno +is set. The flags parameter is not currently used. .PP The function diff --git a/man3/strtol.3 b/man3/strtol.3 index 71df5fcfa..e55012b16 100644 --- a/man3/strtol.3 +++ b/man3/strtol.3 @@ -92,7 +92,8 @@ returns LONG_MIN. If an overflow occurs, .BR strtol () returns LONG_MAX. -In both cases, \fIerrno\fP is set to ERANGE. +In both cases, \fIerrno\fP is set to +.BR ERANGE . Precisely the same holds for .BR strtoll () (with LLONG_MIN and LLONG_MAX instead of LONG_MIN and LONG_MAX). diff --git a/man7/ip.7 b/man7/ip.7 index 19537c844..3d1a8c115 100644 --- a/man7/ip.7 +++ b/man7/ip.7 @@ -421,7 +421,9 @@ struct sockaddr *SO_EE_OFFENDER(struct sock_extended_err *); .in -0.25i .IP .I ee_errno -contains the errno number of the queued error. +contains the +.I errno +number of the queued error. .I ee_origin is the origin code of where the error originated. The other fields are protocol specific.