Format errno.

This commit is contained in:
Michael Kerrisk 2007-06-22 06:05:43 +00:00
parent 35facf001e
commit 09b235db2a
6 changed files with 27 additions and 14 deletions

View File

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

View File

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

View File

@ -38,26 +38,26 @@ errno \- number of last error
The
.I <errno.h>
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

View File

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

View File

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

View File

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