summaryrefslogtreecommitdiff
path: root/usr/src/uts/intel/sys/xen_errno.h
blob: ee0c4b38ec73091ec32c7ad2b0c934e7db2b71f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
/*
 * CDDL HEADER START
 *
 * The contents of this file are subject to the terms of the
 * Common Development and Distribution License (the "License").
 * You may not use this file except in compliance with the License.
 *
 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
 * or http://www.opensolaris.org/os/licensing.
 * See the License for the specific language governing permissions
 * and limitations under the License.
 *
 * When distributing Covered Code, include this CDDL HEADER in each
 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
 * If applicable, add the following below this CDDL HEADER, with the
 * fields enclosed by brackets "[]" replaced with your own identifying
 * information: Portions Copyright [yyyy] [name of copyright owner]
 *
 * CDDL HEADER END
 */

/*
 * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
 * Use is subject to license terms.
 */

#ifndef	_SYS_XEN_ERRNO_H
#define	_SYS_XEN_ERRNO_H

#ifdef __cplusplus
extern "C" {
#endif

/*
 * Xen errno's for HYPERVISOR calls
 *
 * XXPV	This is maintained by hand :(
 *
 * Unfortunately native Xen currently uses the same namespace as the Solaris
 * errno namespace but with (some) different numeric values.
 *
 * This set of errno values match Xen 3.0.3; sigh.
 *
 * In a better world, Xen would make its namespace explicitly different
 * e.g. something like below.
 */

#define	X_EPERM		1
#define	X_ENOENT	2
#define	X_ESRCH		3
#define	X_EINTR		4
#define	X_EIO		5
#define	X_ENXIO		6
#define	X_E2BIG		7

#define	X_EAGAIN	11
#define	X_ENOMEM	12
#define	X_EACCES	13
#define	X_EFAULT	14

#define	X_EBUSY		16
#define	X_EEXIST	17

#define	X_ENODEV	19
#define	X_EISDIR	21
#define	X_EINVAL	22

#define	X_ENOSPC	28
#define	X_ESPIPE	29
#define	X_EROFS		30

#define	X_ENOSYS	38
#define	X_ENOTEMPTY	39

#define	X_ENODATA	61

#define	X_EISCONN	106

#ifndef	_ASM
#if defined(_KERNEL)
/*
 * Error code translation routine to translate xen error codes to
 * Solaris error codes.  Xen returns negative error codes which this
 * routine will translate to a positive one.
 */
extern int xen_xlate_errcode(int);
#endif	/* _KERNEL */
#endif	/* _ASM */

#ifdef __cplusplus
}
#endif

#endif	/* _SYS_XEN_ERRNO_H */