Patch for asm/errno.h

Erik Andersen (andersee@debian.org)
Fri, 31 Oct 1997 02:21:09 -0700


I was noticing that the 2.0.x kernels do not have ENOMEDIUM and EMEDIUMTYPE
defined. It would greatly help the general acceptance and use of these errno
codes for them to be included in 2.0.32. Even if no drivers return them in
the 2.0.x kernels, user space apps will at least be prepared to recognise
them, and won't give cryptic error messages such as:

andersee@dillweed% cdda2wav -D /dev/hdd
cdrom device (/dev/hdd). Setting interface to cooked_ioctl.
open(/dev/hdd): Unknown error 124

Could you please add the included patch for 2.0.32

-Erik

--
Erik B. Andersen   Web:    http://www.inconnect.com/~andersen/ 
                   email:  andersee@debian.org
--This message was written using 73% post-consumer electrons--

[--------------patch follows-----------------]

diff -ur /usr/src/linux-2.0.31/include/asm-alpha/errno.h linux-2.0.31/include/asm-alpha/errno.h --- /usr/src/linux-2.0.31/include/asm-alpha/errno.h Wed Jul 3 22:28:57 1996 +++ linux-2.0.31/include/asm-alpha/errno.h Fri Oct 31 02:17:55 1997 @@ -136,4 +136,7 @@ #define ERESTART 127 /* Interrupted system call should be restarted */ #define ESTRPIPE 128 /* Streams pipe error */ +#define ENOMEDIUM 129 /* No medium found */ +#define EMEDIUMTYPE 130 /* Wrong medium type */ + #endif diff -ur /usr/src/linux-2.0.31/include/asm-i386/errno.h linux-2.0.31/include/asm-i386/errno.h --- /usr/src/linux-2.0.31/include/asm-i386/errno.h Wed Jul 3 22:28:57 1996 +++ linux-2.0.31/include/asm-i386/errno.h Fri Oct 31 02:17:42 1997 @@ -126,4 +126,7 @@ #define EREMOTEIO 121 /* Remote I/O error */ #define EDQUOT 122 /* Quota exceeded */ +#define ENOMEDIUM 123 /* No medium found */ +#define EMEDIUMTYPE 124 /* Wrong medium type */ + #endif diff -ur /usr/src/linux-2.0.31/include/asm-m68k/errno.h linux-2.0.31/include/asm-m68k/errno.h --- /usr/src/linux-2.0.31/include/asm-m68k/errno.h Wed Dec 27 13:46:55 1995 +++ linux-2.0.31/include/asm-m68k/errno.h Fri Oct 31 02:17:28 1997 @@ -124,4 +124,7 @@ #define EREMOTEIO 121 /* Remote I/O error */ #define EDQUOT 122 /* Quota exceeded */ +#define ENOMEDIUM 123 /* No medium found */ +#define EMEDIUMTYPE 124 /* Wrong medium type */ + #endif /* _M68K_ERRNO_H */ diff -ur /usr/src/linux-2.0.31/include/asm-mips/errno.h linux-2.0.31/include/asm-mips/errno.h --- /usr/src/linux-2.0.31/include/asm-mips/errno.h Wed Dec 13 03:39:45 1995 +++ linux-2.0.31/include/asm-mips/errno.h Fri Oct 31 02:17:14 1997 @@ -137,6 +137,8 @@ #define EINPROGRESS 150 /* Operation now in progress */ #define ESTALE 151 /* Stale NFS file handle */ #define ECANCELED 158 /* AIO operation canceled */ +#define ENOMEDIUM 159 /* No medium found */ +#define EMEDIUMTYPE 160 /* Wrong medium type */ #define EDQUOT 1133 /* Quota exceeded */ #define ENFSREMOTE 1134 /* ??? */ diff -ur /usr/src/linux-2.0.31/include/asm-ppc/errno.h linux-2.0.31/include/asm-ppc/errno.h --- /usr/src/linux-2.0.31/include/asm-ppc/errno.h Mon May 27 03:00:59 1996 +++ linux-2.0.31/include/asm-ppc/errno.h Fri Oct 31 02:16:58 1997 @@ -123,6 +123,8 @@ #define EISNAM 120 /* Is a named type file */ #define EREMOTEIO 121 /* Remote I/O error */ #define EDQUOT 122 /* Quota exceeded */ +#define ENOMEDIUM 123 /* No medium found */ +#define EMEDIUMTYPE 124 /* Wrong medium type */ /* Should never be seen by user programs */ #define ERESTARTSYS 512 diff -ur /usr/src/linux-2.0.31/include/asm-sparc/errno.h linux-2.0.31/include/asm-sparc/errno.h --- /usr/src/linux-2.0.31/include/asm-sparc/errno.h Fri Nov 24 19:31:42 1995 +++ linux-2.0.31/include/asm-sparc/errno.h Fri Oct 31 02:16:39 1997 @@ -130,4 +130,7 @@ #define ELIBMAX 123 /* Atmpt to link in too many shared libs */ #define ELIBSCN 124 /* .lib section in a.out corrupted */ +#define ENOMEDIUM 125 /* No medium found */ +#define EMEDIUMTYPE 126 /* Wrong medium type */ + #endif