qemu/linux-user/errno_defs.h
<<
>>
Prefs
   1/*
   2 * Target definitions of errnos. These may be overridden by an
   3 * architecture specific header if needed.
   4 *
   5 * Taken from asm-generic/errno-base.h and asm-generic/errno.h
   6 */
   7
   8#ifndef LINUX_USER_ERRNO_DEFS_H
   9#define LINUX_USER_ERRNO_DEFS_H
  10
  11#define TARGET_EPERM            1      /* Operation not permitted */
  12#define TARGET_ENOENT           2      /* No such file or directory */
  13#define TARGET_ESRCH            3      /* No such process */
  14#define TARGET_EINTR            4      /* Interrupted system call */
  15#define TARGET_EIO              5      /* I/O error */
  16#define TARGET_ENXIO            6      /* No such device or address */
  17#define TARGET_E2BIG            7      /* Argument list too long */
  18#define TARGET_ENOEXEC          8      /* TARGET_Exec format error */
  19#define TARGET_EBADF            9      /* Bad file number */
  20#define TARGET_ECHILD          10      /* No child processes */
  21#define TARGET_EAGAIN          11      /* Try again */
  22#define TARGET_ENOMEM          12      /* Out of memory */
  23#define TARGET_EACCES          13      /* Permission denied */
  24#define TARGET_EFAULT          14      /* Bad address */
  25#define TARGET_ENOTBLK         15      /* Block device required */
  26#define TARGET_EBUSY           16      /* Device or resource busy */
  27#define TARGET_EEXIST          17      /* File exists */
  28#define TARGET_EXDEV           18      /* Cross-device link */
  29#define TARGET_ENODEV          19      /* No such device */
  30#define TARGET_ENOTDIR         20      /* Not a directory */
  31#define TARGET_EISDIR          21      /* Is a directory */
  32#define TARGET_EINVAL          22      /* Invalid argument */
  33#define TARGET_ENFILE          23      /* File table overflow */
  34#define TARGET_EMFILE          24      /* Too many open files */
  35#define TARGET_ENOTTY          25      /* Not a typewriter */
  36#define TARGET_ETXTBSY         26      /* Text file busy */
  37#define TARGET_EFBIG           27      /* File too large */
  38#define TARGET_ENOSPC          28      /* No space left on device */
  39#define TARGET_ESPIPE          29      /* Illegal seek */
  40#define TARGET_EROFS           30      /* Read-only file system */
  41#define TARGET_EMLINK          31      /* Too many links */
  42#define TARGET_EPIPE           32      /* Broken pipe */
  43#define TARGET_EDOM            33      /* Math argument out of domain of func */
  44#define TARGET_ERANGE          34      /* Math result not representable */
  45
  46#define TARGET_EDEADLK         35      /* Resource deadlock would occur */
  47#define TARGET_ENAMETOOLONG    36      /* File name too long */
  48#define TARGET_ENOLCK          37      /* No record locks available */
  49#define TARGET_ENOSYS          38      /* Function not implemented */
  50#define TARGET_ENOTEMPTY       39      /* Directory not empty */
  51#define TARGET_ELOOP           40      /* Too many symbolic links encountered */
  52
  53#define TARGET_ENOMSG          42      /* No message of desired type */
  54#define TARGET_EIDRM           43      /* Identifier removed */
  55#define TARGET_ECHRNG          44      /* Channel number out of range */
  56#define TARGET_EL2NSYNC        45      /* Level 2 not synchronized */
  57#define TARGET_EL3HLT          46      /* Level 3 halted */
  58#define TARGET_EL3RST          47      /* Level 3 reset */
  59#define TARGET_ELNRNG          48      /* Link number out of range */
  60#define TARGET_EUNATCH         49      /* Protocol driver not attached */
  61#define TARGET_ENOCSI          50      /* No CSI structure available */
  62#define TARGET_EL2HLT          51      /* Level 2 halted */
  63#define TARGET_EBADE           52      /* Invalid exchange */
  64#define TARGET_EBADR           53      /* Invalid request descriptor */
  65#define TARGET_EXFULL          54      /* TARGET_Exchange full */
  66#define TARGET_ENOANO          55      /* No anode */
  67#define TARGET_EBADRQC         56      /* Invalid request code */
  68#define TARGET_EBADSLT         57      /* Invalid slot */
  69
  70#define TARGET_EBFONT          59      /* Bad font file format */
  71#define TARGET_ENOSTR          60      /* Device not a stream */
  72#define TARGET_ENODATA         61      /* No data available */
  73#define TARGET_ETIME           62      /* Timer expired */
  74#define TARGET_ENOSR           63      /* Out of streams resources */
  75#define TARGET_ENONET          64      /* Machine is not on the network */
  76#define TARGET_ENOPKG          65      /* Package not installed */
  77#define TARGET_EREMOTE         66      /* Object is remote */
  78#define TARGET_ENOLINK         67      /* Link has been severed */
  79#define TARGET_EADV            68      /* Advertise error */
  80#define TARGET_ESRMNT          69      /* Srmount error */
  81#define TARGET_ECOMM           70      /* Communication error on send */
  82#define TARGET_EPROTO          71      /* Protocol error */
  83#define TARGET_EMULTIHOP       72      /* Multihop attempted */
  84#define TARGET_EDOTDOT         73      /* RFS specific error */
  85#define TARGET_EBADMSG         74      /* Not a data message */
  86#define TARGET_EOVERFLOW       75      /* Value too large for defined data type */
  87#define TARGET_ENOTUNIQ        76      /* Name not unique on network */
  88#define TARGET_EBADFD          77      /* File descriptor in bad state */
  89#define TARGET_EREMCHG         78      /* Remote address changed */
  90#define TARGET_ELIBACC         79      /* Can not access a needed shared library */
  91#define TARGET_ELIBBAD         80      /* Accessing a corrupted shared library */
  92#define TARGET_ELIBSCN         81      /* .lib section in a.out corrupted */
  93#define TARGET_ELIBMAX         82      /* Attempting to link in too many shared libraries */
  94#define TARGET_ELIBEXEC        83      /* Cannot exec a shared library directly */
  95#define TARGET_EILSEQ          84      /* Illegal byte sequence */
  96#define TARGET_ERESTART        85      /* Interrupted system call should be restarted */
  97#define TARGET_ESTRPIPE        86      /* Streams pipe error */
  98#define TARGET_EUSERS          87      /* Too many users */
  99#define TARGET_ENOTSOCK        88      /* Socket operation on non-socket */
 100#define TARGET_EDESTADDRREQ    89      /* Destination address required */
 101#define TARGET_EMSGSIZE        90      /* Message too long */
 102#define TARGET_EPROTOTYPE      91      /* Protocol wrong type for socket */
 103#define TARGET_ENOPROTOOPT     92      /* Protocol not available */
 104#define TARGET_EPROTONOSUPPORT 93      /* Protocol not supported */
 105#define TARGET_ESOCKTNOSUPPORT 94      /* Socket type not supported */
 106#define TARGET_EOPNOTSUPP      95      /* Operation not supported on transport endpoint */
 107#define TARGET_EPFNOSUPPORT    96      /* Protocol family not supported */
 108#define TARGET_EAFNOSUPPORT    97      /* Address family not supported by protocol */
 109#define TARGET_EADDRINUSE      98      /* Address already in use */
 110#define TARGET_EADDRNOTAVAIL   99      /* Cannot assign requested address */
 111#define TARGET_ENETDOWN        100     /* Network is down */
 112#define TARGET_ENETUNREACH     101     /* Network is unreachable */
 113#define TARGET_ENETRESET       102     /* Network dropped connection because of reset */
 114#define TARGET_ECONNABORTED    103     /* Software caused connection abort */
 115#define TARGET_ECONNRESET      104     /* Connection reset by peer */
 116#define TARGET_ENOBUFS         105     /* No buffer space available */
 117#define TARGET_EISCONN         106     /* Transport endpoint is already connected */
 118#define TARGET_ENOTCONN        107     /* Transport endpoint is not connected */
 119#define TARGET_ESHUTDOWN       108     /* Cannot send after transport endpoint shutdown */
 120#define TARGET_ETOOMANYREFS    109     /* Too many references: cannot splice */
 121#define TARGET_ETIMEDOUT       110     /* Connection timed out */
 122#define TARGET_ECONNREFUSED    111     /* Connection refused */
 123#define TARGET_EHOSTDOWN       112     /* Host is down */
 124#define TARGET_EHOSTUNREACH    113     /* No route to host */
 125#define TARGET_EALREADY        114     /* Operation already in progress */
 126#define TARGET_EINPROGRESS     115     /* Operation now in progress */
 127#define TARGET_ESTALE          116     /* Stale NFS file handle */
 128#define TARGET_EUCLEAN         117     /* Structure needs cleaning */
 129#define TARGET_ENOTNAM         118     /* Not a XENIX named type file */
 130#define TARGET_ENAVAIL         119     /* No XENIX semaphores available */
 131#define TARGET_EISNAM          120     /* Is a named type file */
 132#define TARGET_EREMOTEIO       121     /* Remote I/O error */
 133#define TARGET_EDQUOT          122     /* Quota exceeded */
 134
 135#define TARGET_ENOMEDIUM       123     /* No medium found */
 136#define TARGET_EMEDIUMTYPE     124     /* Wrong medium type */
 137#define TARGET_ECANCELED       125     /* Operation Canceled */
 138#define TARGET_ENOKEY          126     /* Required key not available */
 139#define TARGET_EKEYEXPIRED     127     /* Key has expired */
 140#define TARGET_EKEYREVOKED     128     /* Key has been revoked */
 141#define TARGET_EKEYREJECTED    129     /* Key was rejected by service */
 142
 143/* for robust mutexes */
 144#define TARGET_EOWNERDEAD      130     /* Owner died */
 145#define TARGET_ENOTRECOVERABLE 131     /* State not recoverable */
 146
 147#define TARGET_ERFKILL         132     /* Operation not possible due to RF-kill */
 148#define TARGET_EHWPOISON       133     /* Memory page has hardware error */
 149
 150/* QEMU internal, not visible to the guest. This is returned when a
 151 * system call should be restarted, to tell the main loop that it
 152 * should wind the guest PC backwards so it will re-execute the syscall
 153 * after handling any pending signals. They match with the ones the guest
 154 * kernel uses for the same purpose.
 155 */
 156#define TARGET_ERESTARTSYS     512     /* Restart system call (if SA_RESTART) */
 157
 158/* QEMU internal, not visible to the guest. This is returned by the
 159 * do_sigreturn() code after a successful sigreturn syscall, to indicate
 160 * that it has correctly set the guest registers and so the main loop
 161 * should not touch them. We use the value the guest would use for
 162 * ERESTART_NOINTR (which is kernel internal) to guarantee that we won't
 163 * clash with a valid guest errno now or in the future.
 164 */
 165#define TARGET_QEMU_ESIGRETURN 513     /* Return from signal */
 166
 167#endif
 168