1#ifndef __XEN_PUBLIC_ERRNO_H__
2
3#ifndef __ASSEMBLY__
4
5#define XEN_ERRNO(name, value) XEN_##name = value,
6enum 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
32XEN_ERRNO(EPERM,	 1)	/* Operation not permitted */
33XEN_ERRNO(ENOENT,	 2)	/* No such file or directory */
34XEN_ERRNO(ESRCH,	 3)	/* No such process */
35#ifdef __XEN__ /* Internal only, should never be exposed to the guest. */
36XEN_ERRNO(EINTR,	 4)	/* Interrupted system call */
37#endif
38XEN_ERRNO(EIO,		 5)	/* I/O error */
39XEN_ERRNO(ENXIO,	 6)	/* No such device or address */
40XEN_ERRNO(E2BIG,	 7)	/* Arg list too long */
41XEN_ERRNO(ENOEXEC,	 8)	/* Exec format error */
42XEN_ERRNO(EBADF,	 9)	/* Bad file number */
43XEN_ERRNO(ECHILD,	10)	/* No child processes */
44XEN_ERRNO(EAGAIN,	11)	/* Try again */
45XEN_ERRNO(ENOMEM,	12)	/* Out of memory */
46XEN_ERRNO(EACCES,	13)	/* Permission denied */
47XEN_ERRNO(EFAULT,	14)	/* Bad address */
48XEN_ERRNO(EBUSY,	16)	/* Device or resource busy */
49XEN_ERRNO(EEXIST,	17)	/* File exists */
50XEN_ERRNO(EXDEV,	18)	/* Cross-device link */
51XEN_ERRNO(ENODEV,	19)	/* No such device */
52XEN_ERRNO(EINVAL,	22)	/* Invalid argument */
53XEN_ERRNO(ENFILE,	23)	/* File table overflow */
54XEN_ERRNO(EMFILE,	24)	/* Too many open files */
55XEN_ERRNO(ENOSPC,	28)	/* No space left on device */
56XEN_ERRNO(EMLINK,	31)	/* Too many links */
57XEN_ERRNO(EDOM,		33)	/* Math argument out of domain of func */
58XEN_ERRNO(ERANGE,	34)	/* Math result not representable */
59XEN_ERRNO(EDEADLK,	35)	/* Resource deadlock would occur */
60XEN_ERRNO(ENAMETOOLONG,	36)	/* File name too long */
61XEN_ERRNO(ENOLCK,	37)	/* No record locks available */
62XEN_ERRNO(ENOSYS,	38)	/* Function not implemented */
63XEN_ERRNO(ENODATA,	61)	/* No data available */
64XEN_ERRNO(ETIME,	62)	/* Timer expired */
65XEN_ERRNO(EBADMSG,	74)	/* Not a data message */
66XEN_ERRNO(EOVERFLOW,	75)	/* Value too large for defined data type */
67XEN_ERRNO(EILSEQ,	84)	/* Illegal byte sequence */
68#ifdef __XEN__ /* Internal only, should never be exposed to the guest. */
69XEN_ERRNO(ERESTART,	85)	/* Interrupted system call should be restarted */
70#endif
71XEN_ERRNO(ENOTSOCK,	88)	/* Socket operation on non-socket */
72XEN_ERRNO(EOPNOTSUPP,	95)	/* Operation not supported on transport endpoint */
73XEN_ERRNO(EADDRINUSE,	98)	/* Address already in use */
74XEN_ERRNO(EADDRNOTAVAIL, 99)	/* Cannot assign requested address */
75XEN_ERRNO(ENOBUFS,	105)	/* No buffer space available */
76XEN_ERRNO(EISCONN,	106)	/* Transport endpoint is already connected */
77XEN_ERRNO(ENOTCONN,	107)	/* Transport endpoint is not connected */
78XEN_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