···11-/* $Id: errtbls.c,v 1.2 1995/11/25 00:57:55 davem Exp $22- * errtbls.c: Error number conversion tables between various syscall33- * OS semantics.11+/* errtbls.c: Error number conversion tables.42 *55- * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)33+ * Copyright (C) 1995, 2007 David S. Miller (davem@davemloft.net)64 *75 * Based upon preliminary work which is:86 *97 * Copyright (C) 1995 Adrian M. Rodriguez (adrian@remus.rutgers.edu)108 */1191212-#include <asm/bsderrno.h> /* NetBSD (bsd4.4) errnos */1310#include <asm/solerrno.h> /* Solaris errnos */14111515-/* Here are tables which convert between Linux/SunOS error number1616- * values to the equivalent in other OSs. Note that since the Linux1717- * ones have been set up to match exactly those of SunOS, no1818- * translation table is needed for that OS.1212+/* Here is the table which converts between Linux error number values1313+ * to the equivalent under Solaris. Note that since the Linux ones1414+ * have been set up to match exactly those of SunOS, no translation1515+ * table is needed for that OS.1916 */20172118int solaris_errno[] = {···142145 SOL_ELIBMAX,143146 SOL_ELIBSCN,144147};145145-146146-int netbsd_errno[] = {147147- 0,148148- BSD_EPERM,149149- BSD_ENOENT,150150- BSD_ESRCH,151151- BSD_EINTR,152152- BSD_EIO,153153- BSD_ENXIO,154154- BSD_E2BIG,155155- BSD_ENOEXEC,156156- BSD_EBADF,157157- BSD_ECHILD,158158- BSD_EAGAIN,159159- BSD_ENOMEM,160160- BSD_EACCES,161161- BSD_EFAULT,162162- BSD_NOTBLK,163163- BSD_EBUSY,164164- BSD_EEXIST,165165- BSD_EXDEV,166166- BSD_ENODEV,167167- BSD_ENOTDIR,168168- BSD_EISDIR,169169- BSD_EINVAL,170170- BSD_ENFILE,171171- BSD_EMFILE,172172- BSD_ENOTTY,173173- BSD_ETXTBSY,174174- BSD_EFBIG,175175- BSD_ENOSPC,176176- BSD_ESPIPE,177177- BSD_EROFS,178178- BSD_EMLINK,179179- BSD_EPIPE,180180- BSD_EDOM,181181- BSD_ERANGE,182182- BSD_EWOULDBLOCK,183183- BSD_EINPROGRESS,184184- BSD_EALREADY,185185- BSD_ENOTSOCK,186186- BSD_EDESTADDRREQ,187187- BSD_EMSGSIZE,188188- BSD_EPROTOTYPE,189189- BSD_ENOPROTOOPT,190190- BSD_EPROTONOSUPPORT,191191- BSD_ESOCKTNOSUPPORT,192192- BSD_EOPNOTSUPP,193193- BSD_EPFNOSUPPORT,194194- BSD_EAFNOSUPPORT,195195- BSD_EADDRINUSE,196196- BSD_EADDRNOTAVAIL,197197- BSD_ENETDOWN,198198- BSD_ENETUNREACH,199199- BSD_ENETRESET,200200- BSD_ECONNABORTED,201201- BSD_ECONNRESET,202202- BSD_ENOBUFS,203203- BSD_EISCONN,204204- BSD_ENOTONN,205205- BSD_ESHUTDOWN,206206- BSD_ETOOMANYREFS,207207- BSD_ETIMEDOUT,208208- BSD_ECONNREFUSED,209209- BSD_ELOOP,210210- BSD_ENAMETOOLONG,211211- BSD_EHOSTDOWN,212212- BSD_EHOSTUNREACH,213213- BSD_ENOTEMPTY,214214- BSD_EPROCLIM,215215- BSD_EUSERS,216216- BSD_EDQUOT,217217- BSD_ESTALE,218218- BSD_EREMOTE,219219- BSD_ENOSTR,220220- BSD_ETIME,221221- BSD_ENOSR,222222- BSD_ENOMSG,223223- BSD_EBADMSG,224224- BSD_IDRM,225225- BSD_EDEADLK,226226- BSD_ENOLCK,227227- BSD_ENONET,228228- BSD_ERREMOTE,229229- BSD_ENOLINK,230230- BSD_EADV,231231- BSD_ESRMNT,232232- BSD_ECOMM,233233- BSD_EPROTO,234234- BSD_EMULTIHOP,235235- BSD_EINVAL, /* EDOTDOT XXX??? */236236- BSD_REMCHG,237237- BSD_NOSYS,238238- BSD_STRPIPE,239239- BSD_EOVERFLOW,240240- BSD_EBADFD,241241- BSD_ECHRNG,242242- BSD_EL2NSYNC,243243- BSD_EL3HLT,244244- BSD_EL3RST,245245- BSD_NRNG,246246- BSD_EUNATCH,247247- BSD_ENOCSI,248248- BSD_EL2HLT,249249- BSD_EBADE,250250- BSD_EBADR,251251- BSD_EXFULL,252252- BSD_ENOANO,253253- BSD_EBADRQC,254254- BSD_EBADSLT,255255- BSD_EDEADLOCK,256256- BSD_EBFONT,257257- BSD_ELIBEXEC,258258- BSD_ENODATA,259259- BSD_ELIBBAD,260260- BSD_ENOPKG,261261- BSD_ELIBACC,262262- BSD_ENOTUNIQ,263263- BSD_ERESTART,264264- BSD_EUCLEAN,265265- BSD_ENOTNAM,266266- BSD_ENAVAIL,267267- BSD_EISNAM,268268- BSD_EREMOTEIO,269269- BSD_EILSEQ,270270- BSD_ELIBMAX,271271- BSD_ELIBSCN,272272-};273273-
-94
include/asm-sparc/bsderrno.h
···11-/* $Id: bsderrno.h,v 1.3 1996/04/25 06:12:47 davem Exp $22- * bsderrno.h: Error numbers for NetBSD binary compatibility33- *44- * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)55- */66-77-#ifndef _SPARC_BSDERRNO_H88-#define _SPARC_BSDERRNO_H99-1010-#define BSD_EPERM 1 /* Operation not permitted */1111-#define BSD_ENOENT 2 /* No such file or directory */1212-#define BSD_ESRCH 3 /* No such process */1313-#define BSD_EINTR 4 /* Interrupted system call */1414-#define BSD_EIO 5 /* Input/output error */1515-#define BSD_ENXIO 6 /* Device not configured */1616-#define BSD_E2BIG 7 /* Argument list too long */1717-#define BSD_ENOEXEC 8 /* Exec format error */1818-#define BSD_EBADF 9 /* Bad file descriptor */1919-#define BSD_ECHILD 10 /* No child processes */2020-#define BSD_EDEADLK 11 /* Resource deadlock avoided */2121-#define BSD_ENOMEM 12 /* Cannot allocate memory */2222-#define BSD_EACCES 13 /* Permission denied */2323-#define BSD_EFAULT 14 /* Bad address */2424-#define BSD_ENOTBLK 15 /* Block device required */2525-#define BSD_EBUSY 16 /* Device busy */2626-#define BSD_EEXIST 17 /* File exists */2727-#define BSD_EXDEV 18 /* Cross-device link */2828-#define BSD_ENODEV 19 /* Operation not supported by device */2929-#define BSD_ENOTDIR 20 /* Not a directory */3030-#define BSD_EISDIR 21 /* Is a directory */3131-#define BSD_EINVAL 22 /* Invalid argument */3232-#define BSD_ENFILE 23 /* Too many open files in system */3333-#define BSD_EMFILE 24 /* Too many open files */3434-#define BSD_ENOTTY 25 /* Inappropriate ioctl for device */3535-#define BSD_ETXTBSY 26 /* Text file busy */3636-#define BSD_EFBIG 27 /* File too large */3737-#define BSD_ENOSPC 28 /* No space left on device */3838-#define BSD_ESPIPE 29 /* Illegal seek */3939-#define BSD_EROFS 30 /* Read-only file system */4040-#define BSD_EMLINK 31 /* Too many links */4141-#define BSD_EPIPE 32 /* Broken pipe */4242-#define BSD_EDOM 33 /* Numerical argument out of domain */4343-#define BSD_ERANGE 34 /* Result too large */4444-#define BSD_EAGAIN 35 /* Resource temporarily unavailable */4545-#define BSD_EWOULDBLOCK EAGAIN /* Operation would block */4646-#define BSD_EINPROGRESS 36 /* Operation now in progress */4747-#define BSD_EALREADY 37 /* Operation already in progress */4848-#define BSD_ENOTSOCK 38 /* Socket operation on non-socket */4949-#define BSD_EDESTADDRREQ 39 /* Destination address required */5050-#define BSD_EMSGSIZE 40 /* Message too long */5151-#define BSD_EPROTOTYPE 41 /* Protocol wrong type for socket */5252-#define BSD_ENOPROTOOPT 42 /* Protocol not available */5353-#define BSD_EPROTONOSUPPORT 43 /* Protocol not supported */5454-#define BSD_ESOCKTNOSUPPORT 44 /* Socket type not supported */5555-#define BSD_EOPNOTSUPP 45 /* Operation not supported */5656-#define BSD_EPFNOSUPPORT 46 /* Protocol family not supported */5757-#define BSD_EAFNOSUPPORT 47 /* Address family not supported by protocol family */5858-#define BSD_EADDRINUSE 48 /* Address already in use */5959-#define BSD_EADDRNOTAVAIL 49 /* Can't assign requested address */6060-#define BSD_ENETDOWN 50 /* Network is down */6161-#define BSD_ENETUNREACH 51 /* Network is unreachable */6262-#define BSD_ENETRESET 52 /* Network dropped connection on reset */6363-#define BSD_ECONNABORTED 53 /* Software caused connection abort */6464-#define BSD_ECONNRESET 54 /* Connection reset by peer */6565-#define BSD_ENOBUFS 55 /* No buffer space available */6666-#define BSD_EISCONN 56 /* Socket is already connected */6767-#define BSD_ENOTCONN 57 /* Socket is not connected */6868-#define BSD_ESHUTDOWN 58 /* Can't send after socket shutdown */6969-#define BSD_ETOOMANYREFS 59 /* Too many references: can't splice */7070-#define BSD_ETIMEDOUT 60 /* Operation timed out */7171-#define BSD_ECONNREFUSED 61 /* Connection refused */7272-#define BSD_ELOOP 62 /* Too many levels of symbolic links */7373-#define BSD_ENAMETOOLONG 63 /* File name too long */7474-#define BSD_EHOSTDOWN 64 /* Host is down */7575-#define BSD_EHOSTUNREACH 65 /* No route to host */7676-#define BSD_ENOTEMPTY 66 /* Directory not empty */7777-#define BSD_EPROCLIM 67 /* Too many processes */7878-#define BSD_EUSERS 68 /* Too many users */7979-#define BSD_EDQUOT 69 /* Disc quota exceeded */8080-#define BSD_ESTALE 70 /* Stale NFS file handle */8181-#define BSD_EREMOTE 71 /* Too many levels of remote in path */8282-#define BSD_EBADRPC 72 /* RPC struct is bad */8383-#define BSD_ERPCMISMATCH 73 /* RPC version wrong */8484-#define BSD_EPROGUNAVAIL 74 /* RPC prog. not avail */8585-#define BSD_EPROGMISMATCH 75 /* Program version wrong */8686-#define BSD_EPROCUNAVAIL 76 /* Bad procedure for program */8787-#define BSD_ENOLCK 77 /* No locks available */8888-#define BSD_ENOSYS 78 /* Function not implemented */8989-#define BSD_EFTYPE 79 /* Inappropriate file type or format */9090-#define BSD_EAUTH 80 /* Authentication error */9191-#define BSD_ENEEDAUTH 81 /* Need authenticator */9292-#define BSD_ELAST 81 /* Must be equal largest errno */9393-9494-#endif /* !(_SPARC_BSDERRNO_H) */
-94
include/asm-sparc64/bsderrno.h
···11-/* $Id: bsderrno.h,v 1.1 1996/12/26 13:25:21 davem Exp $22- * bsderrno.h: Error numbers for NetBSD binary compatibility33- *44- * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)55- */66-77-#ifndef _SPARC64_BSDERRNO_H88-#define _SPARC64_BSDERRNO_H99-1010-#define BSD_EPERM 1 /* Operation not permitted */1111-#define BSD_ENOENT 2 /* No such file or directory */1212-#define BSD_ESRCH 3 /* No such process */1313-#define BSD_EINTR 4 /* Interrupted system call */1414-#define BSD_EIO 5 /* Input/output error */1515-#define BSD_ENXIO 6 /* Device not configured */1616-#define BSD_E2BIG 7 /* Argument list too long */1717-#define BSD_ENOEXEC 8 /* Exec format error */1818-#define BSD_EBADF 9 /* Bad file descriptor */1919-#define BSD_ECHILD 10 /* No child processes */2020-#define BSD_EDEADLK 11 /* Resource deadlock avoided */2121-#define BSD_ENOMEM 12 /* Cannot allocate memory */2222-#define BSD_EACCES 13 /* Permission denied */2323-#define BSD_EFAULT 14 /* Bad address */2424-#define BSD_ENOTBLK 15 /* Block device required */2525-#define BSD_EBUSY 16 /* Device busy */2626-#define BSD_EEXIST 17 /* File exists */2727-#define BSD_EXDEV 18 /* Cross-device link */2828-#define BSD_ENODEV 19 /* Operation not supported by device */2929-#define BSD_ENOTDIR 20 /* Not a directory */3030-#define BSD_EISDIR 21 /* Is a directory */3131-#define BSD_EINVAL 22 /* Invalid argument */3232-#define BSD_ENFILE 23 /* Too many open files in system */3333-#define BSD_EMFILE 24 /* Too many open files */3434-#define BSD_ENOTTY 25 /* Inappropriate ioctl for device */3535-#define BSD_ETXTBSY 26 /* Text file busy */3636-#define BSD_EFBIG 27 /* File too large */3737-#define BSD_ENOSPC 28 /* No space left on device */3838-#define BSD_ESPIPE 29 /* Illegal seek */3939-#define BSD_EROFS 30 /* Read-only file system */4040-#define BSD_EMLINK 31 /* Too many links */4141-#define BSD_EPIPE 32 /* Broken pipe */4242-#define BSD_EDOM 33 /* Numerical argument out of domain */4343-#define BSD_ERANGE 34 /* Result too large */4444-#define BSD_EAGAIN 35 /* Resource temporarily unavailable */4545-#define BSD_EWOULDBLOCK EAGAIN /* Operation would block */4646-#define BSD_EINPROGRESS 36 /* Operation now in progress */4747-#define BSD_EALREADY 37 /* Operation already in progress */4848-#define BSD_ENOTSOCK 38 /* Socket operation on non-socket */4949-#define BSD_EDESTADDRREQ 39 /* Destination address required */5050-#define BSD_EMSGSIZE 40 /* Message too long */5151-#define BSD_EPROTOTYPE 41 /* Protocol wrong type for socket */5252-#define BSD_ENOPROTOOPT 42 /* Protocol not available */5353-#define BSD_EPROTONOSUPPORT 43 /* Protocol not supported */5454-#define BSD_ESOCKTNOSUPPORT 44 /* Socket type not supported */5555-#define BSD_EOPNOTSUPP 45 /* Operation not supported */5656-#define BSD_EPFNOSUPPORT 46 /* Protocol family not supported */5757-#define BSD_EAFNOSUPPORT 47 /* Address family not supported by protocol family */5858-#define BSD_EADDRINUSE 48 /* Address already in use */5959-#define BSD_EADDRNOTAVAIL 49 /* Can't assign requested address */6060-#define BSD_ENETDOWN 50 /* Network is down */6161-#define BSD_ENETUNREACH 51 /* Network is unreachable */6262-#define BSD_ENETRESET 52 /* Network dropped connection on reset */6363-#define BSD_ECONNABORTED 53 /* Software caused connection abort */6464-#define BSD_ECONNRESET 54 /* Connection reset by peer */6565-#define BSD_ENOBUFS 55 /* No buffer space available */6666-#define BSD_EISCONN 56 /* Socket is already connected */6767-#define BSD_ENOTCONN 57 /* Socket is not connected */6868-#define BSD_ESHUTDOWN 58 /* Can't send after socket shutdown */6969-#define BSD_ETOOMANYREFS 59 /* Too many references: can't splice */7070-#define BSD_ETIMEDOUT 60 /* Operation timed out */7171-#define BSD_ECONNREFUSED 61 /* Connection refused */7272-#define BSD_ELOOP 62 /* Too many levels of symbolic links */7373-#define BSD_ENAMETOOLONG 63 /* File name too long */7474-#define BSD_EHOSTDOWN 64 /* Host is down */7575-#define BSD_EHOSTUNREACH 65 /* No route to host */7676-#define BSD_ENOTEMPTY 66 /* Directory not empty */7777-#define BSD_EPROCLIM 67 /* Too many processes */7878-#define BSD_EUSERS 68 /* Too many users */7979-#define BSD_EDQUOT 69 /* Disc quota exceeded */8080-#define BSD_ESTALE 70 /* Stale NFS file handle */8181-#define BSD_EREMOTE 71 /* Too many levels of remote in path */8282-#define BSD_EBADRPC 72 /* RPC struct is bad */8383-#define BSD_ERPCMISMATCH 73 /* RPC version wrong */8484-#define BSD_EPROGUNAVAIL 74 /* RPC prog. not avail */8585-#define BSD_EPROGMISMATCH 75 /* Program version wrong */8686-#define BSD_EPROCUNAVAIL 76 /* Bad procedure for program */8787-#define BSD_ENOLCK 77 /* No locks available */8888-#define BSD_ENOSYS 78 /* Function not implemented */8989-#define BSD_EFTYPE 79 /* Inappropriate file type or format */9090-#define BSD_EAUTH 80 /* Authentication error */9191-#define BSD_ENEEDAUTH 81 /* Need authenticator */9292-#define BSD_ELAST 81 /* Must be equal largest errno */9393-9494-#endif /* !(_SPARC64_BSDERRNO_H) */