xref: /onnv-gate/usr/src/uts/intel/sys/xen_errno.h (revision 10175:dd9708d1f561)
15741Smrj /*
25741Smrj  * CDDL HEADER START
35741Smrj  *
45741Smrj  * The contents of this file are subject to the terms of the
55741Smrj  * Common Development and Distribution License (the "License").
65741Smrj  * You may not use this file except in compliance with the License.
75741Smrj  *
85741Smrj  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
95741Smrj  * or http://www.opensolaris.org/os/licensing.
105741Smrj  * See the License for the specific language governing permissions
115741Smrj  * and limitations under the License.
125741Smrj  *
135741Smrj  * When distributing Covered Code, include this CDDL HEADER in each
145741Smrj  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
155741Smrj  * If applicable, add the following below this CDDL HEADER, with the
165741Smrj  * fields enclosed by brackets "[]" replaced with your own identifying
175741Smrj  * information: Portions Copyright [yyyy] [name of copyright owner]
185741Smrj  *
195741Smrj  * CDDL HEADER END
205741Smrj  */
215741Smrj 
225741Smrj /*
23*10175SStuart.Maybee@Sun.COM  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
245741Smrj  * Use is subject to license terms.
255741Smrj  */
265741Smrj 
275741Smrj #ifndef	_SYS_XEN_ERRNO_H
285741Smrj #define	_SYS_XEN_ERRNO_H
295741Smrj 
305741Smrj #ifdef __cplusplus
315741Smrj extern "C" {
325741Smrj #endif
335741Smrj 
345741Smrj /*
355741Smrj  * Xen errno's for HYPERVISOR calls
365741Smrj  *
375741Smrj  * XXPV	This is maintained by hand :(
385741Smrj  *
395741Smrj  * Unfortunately native Xen currently uses the same namespace as the Solaris
405741Smrj  * errno namespace but with (some) different numeric values.
415741Smrj  *
425741Smrj  * This set of errno values match Xen 3.0.3; sigh.
435741Smrj  *
44*10175SStuart.Maybee@Sun.COM  * In a better world, Xen would make its namespace explicitly different
455741Smrj  * e.g. something like below.
465741Smrj  */
475741Smrj 
485741Smrj #define	X_EPERM		1
495741Smrj #define	X_ENOENT	2
505741Smrj #define	X_ESRCH		3
515741Smrj #define	X_EINTR		4
525741Smrj #define	X_EIO		5
535741Smrj #define	X_ENXIO		6
545741Smrj #define	X_E2BIG		7
555741Smrj 
56*10175SStuart.Maybee@Sun.COM #define	X_EAGAIN	11
575741Smrj #define	X_ENOMEM	12
585741Smrj #define	X_EACCES	13
595741Smrj #define	X_EFAULT	14
605741Smrj 
615741Smrj #define	X_EBUSY		16
625741Smrj #define	X_EEXIST	17
635741Smrj 
645741Smrj #define	X_ENODEV	19
655741Smrj #define	X_EISDIR	21
665741Smrj #define	X_EINVAL	22
675741Smrj 
685741Smrj #define	X_ENOSPC	28
695741Smrj #define	X_ESPIPE	29
705741Smrj #define	X_EROFS		30
715741Smrj 
725741Smrj #define	X_ENOSYS	38
735741Smrj #define	X_ENOTEMPTY	39
745741Smrj 
755741Smrj #define	X_ENODATA	61
765741Smrj 
775741Smrj #define	X_EISCONN	106
785741Smrj 
795741Smrj #ifndef	_ASM
805741Smrj #if defined(_KERNEL)
815741Smrj /*
825741Smrj  * Error code translation routine to translate xen error codes to
835741Smrj  * Solaris error codes.  Xen returns negative error codes which this
845741Smrj  * routine will translate to a positive one.
855741Smrj  */
865741Smrj extern int xen_xlate_errcode(int);
875741Smrj #endif	/* _KERNEL */
885741Smrj #endif	/* _ASM */
895741Smrj 
905741Smrj #ifdef __cplusplus
915741Smrj }
925741Smrj #endif
935741Smrj 
945741Smrj #endif	/* _SYS_XEN_ERRNO_H */
95