1 #ifndef __XEN_PUBLIC_ERRNO_H__
2 
3 #ifndef __ASSEMBLY__
4 
5 #define XEN_ERRNO(name, value) XEN_##name = value,
6 enum xen_errno {
7 
8 #else /* !__ASSEMBLY__ */
9 
10 #define XEN_ERRNO(name, value) .equ XEN_##name, value
11 
12 #endif /* __ASSEMBLY__ */
13 
14 /* ` enum neg_errnoval {  [ -Efoo for each Efoo in the list below ]  } */
15 /* ` enum errnoval { */
16 
17 #endif /* __XEN_PUBLIC_ERRNO_H__ */
18 
19 #ifdef XEN_ERRNO
20 
21 /*
22  * Values originating from x86 Linux. Please consider using respective
23  * values when adding new definitions here.
24  *
25  * The set of identifiers to be added here shouldn't extend beyond what
26  * POSIX mandates (see e.g.
27  * http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/errno.h.html)
28  * with the exception that we support some optional (XSR) values
29  * specified there (but no new ones should be added).
30  */
31 
32 XEN_ERRNO(EPERM,	 1)	/* Operation not permitted */
33 XEN_ERRNO(ENOENT,	 2)	/* No such file or directory */
34 XEN_ERRNO(ESRCH,	 3)	/* No such process */
35 #ifdef __XEN__ /* Internal only, should never be exposed to the guest. */
36 XEN_ERRNO(EINTR,	 4)	/* Interrupted system call */
37 #endif
38 XEN_ERRNO(EIO,		 5)	/* I/O error */
39 XEN_ERRNO(ENXIO,	 6)	/* No such device or address */
40 XEN_ERRNO(E2BIG,	 7)	/* Arg list too long */
41 XEN_ERRNO(ENOEXEC,	 8)	/* Exec format error */
42 XEN_ERRNO(EBADF,	 9)	/* Bad file number */
43 XEN_ERRNO(ECHILD,	10)	/* No child processes */
44 XEN_ERRNO(EAGAIN,	11)	/* Try again */
45 XEN_ERRNO(ENOMEM,	12)	/* Out of memory */
46 XEN_ERRNO(EACCES,	13)	/* Permission denied */
47 XEN_ERRNO(EFAULT,	14)	/* Bad address */
48 XEN_ERRNO(EBUSY,	16)	/* Device or resource busy */
49 XEN_ERRNO(EEXIST,	17)	/* File exists */
50 XEN_ERRNO(EXDEV,	18)	/* Cross-device link */
51 XEN_ERRNO(ENODEV,	19)	/* No such device */
52 XEN_ERRNO(EINVAL,	22)	/* Invalid argument */
53 XEN_ERRNO(ENFILE,	23)	/* File table overflow */
54 XEN_ERRNO(EMFILE,	24)	/* Too many open files */
55 XEN_ERRNO(ENOSPC,	28)	/* No space left on device */
56 XEN_ERRNO(EMLINK,	31)	/* Too many links */
57 XEN_ERRNO(EDOM,		33)	/* Math argument out of domain of func */
58 XEN_ERRNO(ERANGE,	34)	/* Math result not representable */
59 XEN_ERRNO(EDEADLK,	35)	/* Resource deadlock would occur */
60 XEN_ERRNO(ENAMETOOLONG,	36)	/* File name too long */
61 XEN_ERRNO(ENOLCK,	37)	/* No record locks available */
62 XEN_ERRNO(ENOSYS,	38)	/* Function not implemented */
63 XEN_ERRNO(ENODATA,	61)	/* No data available */
64 XEN_ERRNO(ETIME,	62)	/* Timer expired */
65 XEN_ERRNO(EBADMSG,	74)	/* Not a data message */
66 XEN_ERRNO(EOVERFLOW,	75)	/* Value too large for defined data type */
67 XEN_ERRNO(EILSEQ,	84)	/* Illegal byte sequence */
68 #ifdef __XEN__ /* Internal only, should never be exposed to the guest. */
69 XEN_ERRNO(ERESTART,	85)	/* Interrupted system call should be restarted */
70 #endif
71 XEN_ERRNO(ENOTSOCK,	88)	/* Socket operation on non-socket */
72 XEN_ERRNO(EOPNOTSUPP,	95)	/* Operation not supported on transport endpoint */
73 XEN_ERRNO(EADDRINUSE,	98)	/* Address already in use */
74 XEN_ERRNO(EADDRNOTAVAIL, 99)	/* Cannot assign requested address */
75 XEN_ERRNO(ENOBUFS,	105)	/* No buffer space available */
76 XEN_ERRNO(EISCONN,	106)	/* Transport endpoint is already connected */
77 XEN_ERRNO(ENOTCONN,	107)	/* Transport endpoint is not connected */
78 XEN_ERRNO(ETIMEDOUT,	110)	/* Connection timed out */
79 
80 #undef XEN_ERRNO
81 #endif /* XEN_ERRNO */
82 
83 #ifndef __XEN_PUBLIC_ERRNO_H__
84 #define __XEN_PUBLIC_ERRNO_H__
85 
86 /* ` } */
87 
88 #ifndef __ASSEMBLY__
89 };
90 #endif
91 
92 #define	XEN_EWOULDBLOCK	XEN_EAGAIN	/* Operation would block */
93 #define	XEN_EDEADLOCK	XEN_EDEADLK	/* Resource deadlock would occur */
94 
95 #endif /*  __XEN_PUBLIC_ERRNO_H__ */
96