diff options
Diffstat (limited to 'usr/src/uts/intel/sys/xen_errno.h')
| -rw-r--r-- | usr/src/uts/intel/sys/xen_errno.h | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/usr/src/uts/intel/sys/xen_errno.h b/usr/src/uts/intel/sys/xen_errno.h new file mode 100644 index 0000000000..35a6586eaf --- /dev/null +++ b/usr/src/uts/intel/sys/xen_errno.h @@ -0,0 +1,95 @@ +/* + * 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 2007 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#ifndef _SYS_XEN_ERRNO_H +#define _SYS_XEN_ERRNO_H + +#pragma ident "%Z%%M% %I% %E% SMI" + +#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 it's 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_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 */ |
