Commit Graph

35 Commits

Author SHA1 Message Date
Michael Kerrisk 929ccaa3db Small rewrites in DESCRIPTION. 2008-07-08 12:32:50 +00:00
Michael Kerrisk 0b6d88cf86 Add a pointer to signal(7) for further explanation of EINTR. 2008-07-04 11:32:03 +00:00
Michael Kerrisk eba722884d s/nonzero/non-zero/ 2008-03-19 13:16:39 +00:00
Michael Kerrisk dbb8ac51fb ffix 2008-01-27 12:08:05 +00:00
Michael Kerrisk c382a36592 hyphenation fixes 2007-12-25 22:02:19 +00:00
Michael Kerrisk a6e2f12821 Make the standard indent for code samples, shell session
logs, etc. to be ".in +4n".
2007-12-19 07:19:23 +00:00
Michael Kerrisk 0daa9e92d0 Fix redundant formatting macros 2007-09-20 16:26:31 +00:00
Michael Kerrisk c11b1abf2e Change mtk's email address 2007-09-20 06:52:22 +00:00
Michael Kerrisk a8d5553785 ffix 2007-07-18 20:24:30 +00:00
Michael Kerrisk 2f0af33ba6 ffix 2007-06-22 19:42:52 +00:00
Michael Kerrisk 09b235db2a Format errno. 2007-06-22 06:05:43 +00:00
Michael Kerrisk 363a3cc956 Added section numbers to page xrefs 2007-05-21 21:23:17 +00:00
Michael Kerrisk 0ed55ece49 Make "manual" in .TH line "Linux Programmers Manual" 2007-05-18 08:43:42 +00:00
Michael Kerrisk be7fff26d5 Wrap source lines 2007-05-12 13:26:09 +00:00
Michael Kerrisk fb18673428 Adding section numbers to xrefs toother pages 2007-05-12 00:30:29 +00:00
Michael Kerrisk c13182efa3 Wrapped long lines, wrapped at sentence boundaries; stripped trailing
white space.
2007-04-12 22:42:49 +00:00
Michael Kerrisk c4ac7ddef1 tfix 2006-12-27 03:59:48 +00:00
Michael Kerrisk 68e1685c25 Updated CONFORMING TO section 2006-08-03 13:57:30 +00:00
Michael Kerrisk 3f1c1b0aa3 Spelling fixes. 2006-05-29 01:20:08 +00:00
Michael Kerrisk 37b6aec337 Add SEE ALSO referring to new error.3 2006-04-28 06:47:38 +00:00
Michael Kerrisk f8bb81c576 spfix 2006-03-20 03:13:48 +00:00
Michael Kerrisk 9ff08aad91 Formatting fixes 2006-02-09 20:24:53 +00:00
Michael Kerrisk a0ddea8773 Add Linux-specific errors, and mark individual errors as being present
in POSIX or C99

Hello Kurt,

Thanks for your message.

> man3/errno.3 was missing some errors. 

Indeed.

> This patch updates errno.3 based
> on /usr/include/linux/errno.h as of 2.6.16-rc2. 

I do not quite understand that last: /usr/include/linux/errno.h is a 
userland file -- it probably won't tie up too well to a 
specific kernel version (or am I missing something?).

> I also synced the error
> description in the man page with the error descriptions from the header
> file.

This generates some useful info, but also some things that are incorrect.
For example, since you are talking about a glibc header, does a 
particular error even occur on Linux.  (See some examples below.)

I think you also overlooked the fact that the page says that the listed 
errors are defined by POSIX.1-2001.  So it is not sufficient to just 
add new errors to the list.  On the other hand, it is irritating
that the current page does not list Linux-specific errors.
And you patch has finally pushed me to do something I've been 
thinking of for a while.  So I've changed the page to mark the 
errors that are POSIX, and added the Linux-specifc errors, 
integrating some of your patch.

> The patch was diffed against manpages-2.22.

Thanks -- many people forget to mention that detail.

> --- errno.3.orig    2005-12-14 07:09:39.000000000 -0500
> +++ errno.3    2006-02-06 23:45:52.000000000 -0500
> @@ -23,9 +23,11 @@
>  .\" 5 Oct 2002, Modified by Michael Kerrisk <mtk-manpages@gmx.net>
>  .\"     Updated for POSIX 1003.1 2001
>  .\" 2004-12-17 Martin Schulze <joey@infodrom.org>, mtk
> -.\"    Removed errno declaration prototype, added notes
> +.\"        Removed errno declaration prototype, added notes
> +.\" 7 Feb 2006, Modified by Kurt Wall <kwall@kurtwerks.com>
> +.\"     Add missing errors, sync to linux-2.6.16-rc2
>  .\"
> -.TH ERRNO 3 2004-12-17 "" "Library functions"
> +.TH ERRNO 3 2006-02-07 "" "Library functions"
>  .SH NAME
>  errno \- number of last error
>  .SH SYNOPSIS
> @@ -71,61 +73,95 @@
>  .\" FIXME The following list is far from complete
>  .TP
>  .B E2BIG
> -Arg list too long
> +Argument list too long

ok

>  .TP
>  .B EACCES
>  Permission denied
>  .TP
>  .B EADDRINUSE
> -Address in use
> +Address already in use

ok

>  .TP
>  .B EADDRNOTAVAIL
> -Address not available
> +Cannot assign requested address

ok

> +.TP
> +.B EADV
> +Advertise error

This is a HURD error.  As far as I can tell it does not occur on Linux.

>  .TP
>  .B EAFNOSUPPORT
> -Address family not supported
> +Address family not supported by protocol

POSIX differs.  I stayed with POSIX.

>  .TP
>  .B EAGAIN
> -Resource temporarily unavailable
> +Try again

This is wrong.  (i.e., it does not match POSIX and/or 
what perror(3) produces)

>  .TP
>  .B EALREADY
> -Connection already in progress
> +Operation already in progress

POSIX differs.  I stayed with POSIX.

> +.TP
> +.B EBADE
> +Invalid exchange

ok

>  .TP
>  .B EBADF
> -Bad file descriptor
> +Bad file number

This is wrong.

> +.TP
> +.B EBADFD
> +File descriptor in bad state

ok

>  .TP
>  .B EBADMSG
> -Bad message
> +Not a data message

This is wrong.

> +.TP
> +.B EBADR
> +Invalid request descriptor

ok

> +.TP
> +.B EBADRQC
> +Invalid request code

ok

> +.TP
> +.B EBADSLT
> +Invalid slot

ok

> +.TP
> +.B EBFONT
> +Bad font file format

As far as I can tell, this is not used on Linux.  Let me know 
if you find otherwise. (I didn't add it)

>  .TP
>  .B EBUSY
> -Resource busy
> +Device or resource busy

ok

>  .TP
>  .B ECANCELED
> -Operation canceled
> +Operation Canceled

Please review the output of automated scripts!
(not changed)

>  .TP
>  .B ECHILD
>  No child processes
>  .TP
> +.B ECHRNG
> +Channel number out of range

ok

> +.TP
> +.B ECOMM
> +Communication error on send

ok

> +.TP
>  .B ECONNABORTED
> -Connection aborted
> +Software caused connection abort

POSIX differs.  I stayed with POSIX.

>  .TP
>  .B ECONNREFUSED
>  Connection refused
>  .TP
>  .B ECONNRESET
> -Connection reset
> +Connection reset by peer

POSIX differs.  I stayed with POSIX.

>  .TP
>  .B EDEADLK
> -Resource deadlock avoided
> +Resource deadlock would occur

POSIX differs.  I stayed with POSIX.

> +.TP
> +.B EDEADLOCK
> +Resource deadlock would occur (might be the same value as
> +.BR EDEADLK)

I wrote just "Synonym for EDEADLK"

>  .TP
>  .B EDESTADDRREQ
>  Destination address required
>  .TP
>  .B EDOM
> -Domain error
> +Math argument out of domain of func

? Garbled

I wrote the POSIX defn: Mathematics argument out of domain of function

> +.TP
> +.B EDOTDOT
> +RFS specific error

This is defined, but appears not to be used.
(I didn't add it)

>  .TP
>  .B EDQUOT
> -Reserved
> +Quota exceeded

POSIX says "Reserved."  In this case better to go with
"Disk quota exceeded"

>  .TP
>  .B EEXIST
>  File exists
> @@ -136,8 +172,11 @@
>  .B EFBIG
>  File too large
>  .TP
> +.B EHOSTDOWN
> +Host is down

ok

> +.TP
>  .B EHOSTUNREACH
> -Host is unreachable
> +No route to host

POSIX differs.  I stayed with POSIX.

>  .TP
>  .B EIDRM
>  Identifier removed
> @@ -146,25 +185,70 @@
>  Illegal byte sequence
>  .TP
>  .B EINPROGRESS
> -Operation in progress
> +Operation now in progress

POSIX differs.  I stayed with POSIX.

>  .TP
>  .B EINTR
> -Interrupted function call
> +Interrupted system call

POSIX differs.  I stayed with POSIX.

>  .TP
>  .B EINVAL
>  Invalid argument
>  .TP
>  .B EIO
> -Input/output error
> +I/O error

POSIX differs.  I stayed with POSIX.

>  .TP
>  .B EISCONN
> -Socket is connected
> +Transport endpoint is already connected

POSIX differs.  I stayed with POSIX.

>  .TP
>  .B EISDIR
>  Is a directory
>  .TP
> +.B EISNAM
> +Is a named type file

ok

> +.TP
> +.B EKEYEXPIRED
> +Key has expired

ok

> +.TP
> +.B EKEYREJECTED
> +Key was rejected by service

ok

> +.TP
> +.B EKEYREVOKED
> +Key has been revoked

ok

> +.TP
> +.B EL2HLT
> +Level 2 halted

ok

> +.TP
> +.B EL2NSYNC
> +Level 2 not synchronized

ok

> +.TP
> +.B EL3HLT
> +Level 3 halted

ok

> +.TP
> +.B EL3RST
> +Level 3 reset

ok

> +.TP
> +.B ELIBACC
> +Can not access a needed shared library

ok

> +.TP
> +.B ELIBBAD
> +Accessing a corrupted shared library

ok

> +.TP
> +.B ELIBEXEC
> +Cannot exec a shared library directly

ok

> +.TP
> +.B ELIBMAX
> +Attempting to link in too many shared libraries

ok

> +.TP
> +.B ELIBSCN
> +.lib section in a.out corrupted

ok

> +.TP
> +.B ELNRNG
> +Link number out of range

This is defined, but appears not to be used.
(I didn't add it)

> +.TP
>  .B ELOOP
> -Too many levels of symbolic links
> +Too many symbolic links encountered

this is wrong

> +.TP
> +.B EMEDIUMTYPE
> +Wrong medium type
>  .TP
>  .B EMFILE
>  Too many open files
> @@ -173,32 +257,41 @@
>  Too many links
>  .TP
>  .B EMSGSIZE
> -Inappropriate message buffer length
> +Message too long

ok

>  .TP
>  .B EMULTIHOP
> -Reserved
> +Multihop attempted

ok
POSIX says "Reserved."  In this case better to go with
Linux.

>  .TP
>  .B ENAMETOOLONG
> -Filename too long
> +File name too long

Scripted output?
(no change)

> +.TP
> +.B ENAVAIL
> +No XENIX semaphores available

This is defined, but appears not to be used.
(I didn't add it)

>  .TP
>  .B ENETDOWN
>  Network is down
>  .TP
>  .B ENETRESET
> -Connection aborted by network
> +Network dropped connection because of reset

POSIX differs.  I stayed with POSIX.

>  .TP
>  .B ENETUNREACH
> -Network unreachable
> +Network is unreachable

POSIX differs.  I stayed with POSIX.

>  .TP
>  .B ENFILE
> -Too many open files in system
> +File table overflow

This is wrong

> +.TP
> +.B ENOANO
> +No anode

This is defined, but appears not to be used.
(I didn't add it)

>  .TP
>  .B ENOBUFS
>  No buffer space available
> +.TP
> +.B ENOCSI
> +No CSI structure available

This is defined, but appears not to be used.
(I didn't add it)

>  .\" ENODATA is part of XSR option
>  .TP
>  .B ENODATA
> -No message is available on the STREAM head read queue
> +No data available

POSIX differs.  I stayed with POSIX.

>  .TP
>  .B ENODEV
>  No such device
> @@ -209,17 +302,29 @@
>  .B ENOEXEC
>  Exec format error
>  .TP
> +.B ENOKEY
> +Required key not available

ok

> +.TP
>  .B ENOLCK
> -No locks available
> +No record locks available

This is wrong

>  .TP
>  .B ENOLINK
> -Reserved
> +Link has been severed

ok
POSIX says "Reserved."  In this case better to go with
Linux.

> +.TP
> +.B ENOMEDIUM
> +No medium found

ok

>  .TP
>  .B ENOMEM
> -Not enough space
> +Out of memory

POSIX differs.  I stayed with POSIX.

>  .TP
>  .B ENOMSG
> -No message of the desired type
> +No message of desired type

POSIX differs.  I stayed with POSIX.

> +.TP
> +.B ENONET
> +Machine is not on the network

ok

> +.TP
> +.B ENOPKG
> +Package not installed

ok

>  .TP
>  .B ENOPROTOOPT
>  Protocol not available
> @@ -229,17 +334,20 @@
>  .\" ENOSR is part of XSR option
>  .TP
>  .B ENOSR
> -No STREAM resources
> +Out of streams resources

POSIX differs.  I stayed with POSIX.

>  .\" ENOSTR is part of XSR option
>  .TP
>  .B ENOSTR
> -Not a STREAM
> +Device not a stream

POSIX differs.  I stayed with POSIX.

>  .TP
>  .B ENOSYS
>  Function not implemented
>  .TP
> +.B ENOTBLK
> +Block device required
> +.TP

ok

>  .B ENOTCONN
> -The socket is not connected
> +Transport endpoint is not connected

POSIX differs.  I stayed with POSIX.

>  .TP
>  .B ENOTDIR
>  Not a directory
> @@ -247,27 +355,33 @@
>  .B ENOTEMPTY
>  Directory not empty
>  .TP
> -.B ENOTSOCK
> -Not a socket
> +.B ENOTNAM
> +Not a XENIX named type file

This is defined, but appears not to be used.
(I didn't add it)

>  .TP
> -.B ENOTSUP
> -Not supported

No!  This exists.


> +.B ENOTSOCK
> +Socket operation on non-socket
>  .TP
>  .B ENOTTY
> -Inappropriate I/O control operation
> +Not a typewriter

this is wrong

> +.TP
> +.B ENOTUNIQ
> +Name not unique on network

ok

>  .TP
>  .B ENXIO
>  No such device or address
>  .TP
>  .B EOPNOTSUPP
> -Operation not supported on socket
> +Operation not supported on transport endpoint

POSIX differs.  I stayed with POSIX.

(In passing ENOTSUP and EOPNOTSUPP have the same value on Linux;
POSIX.1 does not permit this.)

>  .TP
>  .B EOVERFLOW
> -Value too large to be stored in data type
> +Value too large for defined data type

POSIX differs.  I stayed with POSIX.

>  .TP
>  .B EPERM
>  Operation not permitted
>  .TP
> +.B EPFNOSUPPORT
> +Protocol family not supported

ok

> +.TP
>  .B EPIPE
>  Broken pipe
>  .TP
> @@ -281,39 +395,76 @@
>  Protocol wrong type for socket
>  .TP
>  .B ERANGE
> -Result too large
> +Math result not representable

POSIX differs.  I stayed with POSIX.

> +.TP
> +.B EREMCHG
> +Remote address changed

ok

> +.TP
> +.B EREMOTE
> +Object is remote

ok

> +.TP
> +.B EREMOTEIO
> +Remote I/O error

ok

> +.TP
> +.B ERESTART
> +Interrupted system call should be restarted

ok

>  .TP
>  .B EROFS
>  Read-only file system
>  .TP
> +.B ESHUTDOWN
> +Cannot send after transport endpoint shutdown

ok

> +.TP
> +.B ESOCKTNOSUPPORT
> +Socket type not supported

ok

> +.TP
>  .B ESPIPE
> -Invalid seek
> +Illegal seek

POSIX differs.  I stayed with POSIX.

>  .TP
>  .B ESRCH
>  No such process
>  .TP
> +.B ESRMNT
> +Srmount error

This is defined, but appears not to be used.
(I didn't add it)

> +.TP
>  .B ESTALE
> -Stale file handle
> +Stale NFS file handle

Tricky -- you are right about the error message, 
but the message itself is wrong, because the error 
can occur on other file sytems also.
(not changed)

>  .\" Can occur for NFS and for other file systems
>  .\" ETIME is part of XSR option
>  .TP
> +.B ESTRPIPE
> +Streams pipe error

ok

> +.TP
>  .B ETIME
> -STREAM 
> -.BR ioctl () 
> -timeout
> +Timer expired

POSIX differs, but Linux doesn't have streams, and the error is 
used for various purposes.  Changed as you proposed.

>  .TP
>  .B ETIMEDOUT
> -Operation timed out
> +Connection timed out

ok

> +.TP
> +.B ETOOMANYREFS
> +Too many references: cannot splice

This is defined, but appears not to be used.
(I didn't add it)

>  .TP
>  .B ETXTBSY
>  Text file busy
>  .TP
> -.B EWOULDBLOCK
> -Operation would block (may be same value as
> -.BR EAGAIN )

Absolutely not!!

> +.B EUCLEAN
> +Structure needs cleaning

ok

> +.TP
> +.B EUNATCH
> +Protocol driver not attached

ok

> +.TP
> +.B EUSERS
> +Too many users

ok

> +.TP
> +.B EWOULDBLOCK    
> +Operation would block (might be same value as
> +.BR EAGAIN)

okay (except formatting was not quite right: .BR EAGAIN )

>  .TP
>  .B EXDEV
> -Improper link
> +Cross-device link
> +.TP
> +.B EXFULL
> +Exchange full

ok
2006-02-08 18:26:38 +00:00
Michael Kerrisk d7871cf963 Added err(3) to SEE ALSO 2005-12-14 12:09:39 +00:00
Michael Kerrisk 3fa59745c5 Added FIXME 2005-11-22 15:54:50 +00:00
Michael Kerrisk 31e9a9ec99 Change itacised function names and page xrefs to bold 2005-11-02 11:34:24 +00:00
Michael Kerrisk 1e32103455 Formatting fixes 2005-10-20 15:11:10 +00:00
Michael Kerrisk 63aa9df02f Automated unformatting of parentheses using unformat_parens.sh 2005-10-19 07:07:02 +00:00
Michael Kerrisk 14ee3bff41 Formatting fixes 2005-07-19 15:38:39 +00:00
Michael Kerrisk 2bc2f4798f hyphen/dash fixes 2005-07-06 12:57:38 +00:00
Michael Kerrisk 4d9b698450 Hyphenation/dash fixes 2005-07-06 07:41:37 +00:00
Michael Kerrisk 0543288347 Martin Schulze, mtk
Removed errno declaration from prototype, added notes
on historical need for this declaration.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=174175
2004-12-17 12:20:07 +00:00
Michael Kerrisk 6b79fcd53e small fixes from Martin Schulze 2004-12-01 13:56:47 +00:00
Michael Kerrisk 305a0578bf Global change of email address for MTK (now: mtk-manpages@gmx.net) 2004-11-03 14:43:40 +00:00
Michael Kerrisk fea681dafb Import of man-pages 1.70 2004-11-03 13:51:07 +00:00