Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/osf1 OSF/1 errno definitions, and a NetBSD -> OSF...
details: https://anonhg.NetBSD.org/src/rev/0dc130a61a64
branches: trunk
changeset: 472150:0dc130a61a64
user: cgd <cgd%NetBSD.org@localhost>
date: Fri Apr 23 05:37:41 1999 +0000
description:
OSF/1 errno definitions, and a NetBSD -> OSF/1 errno mapping table.
diffstat:
sys/compat/osf1/osf1_errno.c | 127 ++++++++++++++++++++++++++++++++++++
sys/compat/osf1/osf1_errno.h | 150 +++++++++++++++++++++++++++++++++++++++++++
2 files changed, 277 insertions(+), 0 deletions(-)
diffs (285 lines):
diff -r 67bce960d841 -r 0dc130a61a64 sys/compat/osf1/osf1_errno.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/compat/osf1/osf1_errno.c Fri Apr 23 05:37:41 1999 +0000
@@ -0,0 +1,127 @@
+/* $NetBSD: osf1_errno.c,v 1.1 1999/04/23 05:37:41 cgd Exp $ */
+
+/*
+ * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by Christopher G. Demetriou
+ * for the NetBSD Project.
+ * 4. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <compat/osf1/osf1_errno.h>
+
+/*
+ * This table is used to translate NetBSD errnos to OSF/1 errnos
+ * when returning from a system call.
+ *
+ * It is up to date as of Digital UNIX V4.0 and NetBSD 1.4.
+ */
+int netbsd_to_osf1_errno[] = {
+ 0,
+ OSF1_EPERM, /* EPERM (1) -> 1 */
+ OSF1_ENOENT, /* ENOENT (2) -> 2 */
+ OSF1_ESRCH, /* ESRCH (3) -> 3 */
+ OSF1_EINTR, /* EINTR (4) -> 4 */
+ OSF1_EIO, /* EIO (5) -> 5 */
+ OSF1_ENXIO, /* ENXIO (6) -> 6 */
+ OSF1_E2BIG, /* E2BIG (7) -> 7 */
+ OSF1_ENOEXEC, /* ENOEXEC (8) -> 8 */
+ OSF1_EBADF, /* EBADF (9) -> 9 */
+ OSF1_ECHILD, /* ECHILD (10) -> 10 */
+ OSF1_EDEADLK, /* EDEADLK (11) -> 11 */
+ OSF1_ENOMEM, /* ENOMEM (12) -> 12 */
+ OSF1_EACCES, /* EACCES (13) -> 13 */
+ OSF1_EFAULT, /* EFAULT (14) -> 14 */
+ OSF1_ENOTBLK, /* ENOTBLK (15) -> 15 */
+ OSF1_EBUSY, /* EBUSY (16) -> 16 */
+ OSF1_EEXIST, /* EEXIST (17) -> 17 */
+ OSF1_EXDEV, /* EXDEV (18) -> 18 */
+ OSF1_ENODEV, /* ENODEV (19) -> 19 */
+ OSF1_ENOTDIR, /* ENOTDIR (20) -> 20 */
+ OSF1_EISDIR, /* EISDIR (21) -> 21 */
+ OSF1_EINVAL, /* EINVAL (22) -> 22 */
+ OSF1_ENFILE, /* ENFILE (23) -> 23 */
+ OSF1_EMFILE, /* EMFILE (24) -> 24 */
+ OSF1_ENOTTY, /* ENOTTY (25) -> 25 */
+ OSF1_ETXTBSY, /* ETXTBSY (26) -> 26 */
+ OSF1_EFBIG, /* EFBIG (27) -> 27 */
+ OSF1_ENOSPC, /* ENOSPC (28) -> 28 */
+ OSF1_ESPIPE, /* ESPIPE (29) -> 29 */
+ OSF1_EROFS, /* EROFS (30) -> 30 */
+ OSF1_EMLINK, /* EMLINK (31) -> 31 */
+ OSF1_EPIPE, /* EPIPE (32) -> 32 */
+ OSF1_EDOM, /* EDOM (33) -> 33 */
+ OSF1_ERANGE, /* ERANGE (34) -> 34 */
+ OSF1_ENOSYS, /* EAGAIN (35) has no equivalent */
+ OSF1_EINPROGRESS, /* EINPROGRESS (36) -> 36 */
+ OSF1_EALREADY, /* EALREADY (37) -> 37 */
+ OSF1_ENOTSOCK, /* ENOTSOCK (38) -> 38 */
+ OSF1_EDESTADDRREQ, /* EDESTADDRREQ (39) -> 39 */
+ OSF1_EMSGSIZE, /* EMSGSIZE (40) -> 40 */
+ OSF1_EPROTOTYPE, /* EPROTOTYPE (41) -> 41 */
+ OSF1_ENOPROTOOPT, /* ENOPROTOOPT (42) -> 42 */
+ OSF1_EPROTONOSUPPORT, /* EPROTONOSUPPORT (43) -> 43 */
+ OSF1_ESOCKTNOSUPPORT, /* ESOCKTNOSUPPORT (44) -> 44 */
+ OSF1_EOPNOTSUPP, /* EOPNOTSUPP (45) -> 45 */
+ OSF1_EPFNOSUPPORT, /* EPFNOSUPPORT (46) -> 46 */
+ OSF1_EAFNOSUPPORT, /* EAFNOSUPPORT (47) -> 47 */
+ OSF1_EADDRINUSE, /* EADDRINUSE (48) -> 48 */
+ OSF1_EADDRNOTAVAIL, /* EADDRNOTAVAIL (49) -> 49 */
+ OSF1_ENETDOWN, /* ENETDOWN (50) -> 50 */
+ OSF1_ENETUNREACH, /* ENETUNREACH (51) -> 51 */
+ OSF1_ENETRESET, /* ENETRESET (52) -> 52 */
+ OSF1_ECONNABORTED, /* ECONNABORTED (53) -> 53 */
+ OSF1_ECONNRESET, /* ECONNRESET (54) -> 54 */
+ OSF1_ENOBUFS, /* ENOBUFS (55) -> 55 */
+ OSF1_EISCONN, /* EISCONN (56) -> 56 */
+ OSF1_ENOTCONN, /* ENOTCONN (57) -> 57 */
+ OSF1_ESHUTDOWN, /* ESHUTDOWN (58) -> 58 */
+ OSF1_ETOOMANYREFS, /* ETOOMANYREFS (59) -> 59 */
+ OSF1_ETIMEDOUT, /* ETIMEDOUT (60) -> 60 */
+ OSF1_ECONNREFUSED, /* ECONNREFUSED (61) -> 61 */
+ OSF1_ELOOP, /* ELOOP (62) -> 62 */
+ OSF1_ENAMETOOLONG, /* ENAMETOOLONG (63) -> 63 */
+ OSF1_EHOSTDOWN, /* EHOSTDOWN (64) -> 64 */
+ OSF1_EHOSTUNREACH, /* EHOSTUNREACH (65) -> 65 */
+ OSF1_ENOTEMPTY, /* ENOTEMPTY (66) -> 66 */
+ OSF1_EPROCLIM, /* EPROCLIM (67) -> 67 */
+ OSF1_EUSERS, /* EUSERS (68) -> 68 */
+ OSF1_EDQUOT, /* EDQUOT (69) -> 69 */
+ OSF1_ESTALE, /* ESTALE (70) -> 70 */
+ OSF1_EREMOTE, /* EREMOTE (71) -> 71 */
+ OSF1_EBADRPC, /* EBADRPC (72) -> 72 */
+ OSF1_ERPCMISMATCH, /* ERPCMISMATCH (73) -> 73 */
+ OSF1_EPROGUNAVAIL, /* EPROGUNAVAIL (74) -> 74 */
+ OSF1_EPROGMISMATCH, /* EPROGMISMATCH (75) -> 75 */
+ OSF1_EPROCUNAVAIL, /* EPROCUNAVAIL (76) -> 76 */
+ OSF1_ENOLCK, /* ENOLCK (77) -> 77 */
+ OSF1_ENOSYS, /* ENOSYS (78) -> 78 */
+ OSF1_EFTYPE, /* EFTYPE (79) -> 79 */
+ OSF1_ENOSYS, /* EAUTH (80) has no equivalent */
+ OSF1_ENOSYS, /* ENEEDAUTH (81) has no equivalent */
+ OSF1_EIDRM, /* EIDRM (82) -> 81 */
+ OSF1_ENOMSG, /* ENOMSG (83) -> 80 */
+ OSF1_EOVERFLOW, /* EOVERFLOW (84) -> 103 */
+};
diff -r 67bce960d841 -r 0dc130a61a64 sys/compat/osf1/osf1_errno.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/compat/osf1/osf1_errno.h Fri Apr 23 05:37:41 1999 +0000
@@ -0,0 +1,150 @@
+/* $NetBSD: osf1_errno.h,v 1.1 1999/04/23 05:37:42 cgd Exp $ */
+
+/*
+ * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by Christopher G. Demetriou
+ * for the NetBSD Project.
+ * 4. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * OSF/1 error number definitions, as described by the Digital UNIX V4.0
+ * <sys/errno.h>.
+ */
+
+#ifndef _OSF1_ERRNO_H_
+#define _OSF1_ERRNO_H_
+
+#define OSF1_ESUCCESS 0
+#define OSF1_EPERM 1
+#define OSF1_ENOENT 2
+#define OSF1_ESRCH 3
+#define OSF1_EINTR 4
+#define OSF1_EIO 5
+#define OSF1_ENXIO 6
+#define OSF1_E2BIG 7
+#define OSF1_ENOEXEC 8
+#define OSF1_EBADF 9
+#define OSF1_ECHILD 10
+#define OSF1_EDEADLK 11
+#define OSF1_ENOMEM 12
+#define OSF1_EACCES 13
+#define OSF1_EFAULT 14
+#define OSF1_ENOTBLK 15
+#define OSF1_EBUSY 16
+#define OSF1_EEXIST 17
+#define OSF1_EXDEV 18
+#define OSF1_ENODEV 19
+#define OSF1_ENOTDIR 20
+#define OSF1_EISDIR 21
+#define OSF1_EINVAL 22
+#define OSF1_ENFILE 23
+#define OSF1_EMFILE 24
+#define OSF1_ENOTTY 25
+#define OSF1_ETXTBSY 26
+#define OSF1_EFBIG 27
+#define OSF1_ENOSPC 28
+#define OSF1_ESPIPE 29
+#define OSF1_EROFS 30
+#define OSF1_EMLINK 31
+#define OSF1_EPIPE 32
+#define OSF1_EDOM 33
+#define OSF1_ERANGE 34
+#define OSF1_EWOULDBLOCK 35
+#define OSF1_EINPROGRESS 36
+#define OSF1_EALREADY 37
+#define OSF1_ENOTSOCK 38
+#define OSF1_EDESTADDRREQ 39
+#define OSF1_EMSGSIZE 40
+#define OSF1_EPROTOTYPE 41
+#define OSF1_ENOPROTOOPT 42
+#define OSF1_EPROTONOSUPPORT 43
+#define OSF1_ESOCKTNOSUPPORT 44
+#define OSF1_EOPNOTSUPP 45
+#define OSF1_EPFNOSUPPORT 46
+#define OSF1_EAFNOSUPPORT 47
+#define OSF1_EADDRINUSE 48
+#define OSF1_EADDRNOTAVAIL 49
+#define OSF1_ENETDOWN 50
+#define OSF1_ENETUNREACH 51
+#define OSF1_ENETRESET 52
+#define OSF1_ECONNABORTED 53
+#define OSF1_ECONNRESET 54
+#define OSF1_ENOBUFS 55
+#define OSF1_EISCONN 56
+#define OSF1_ENOTCONN 57
+#define OSF1_ESHUTDOWN 58
+#define OSF1_ETOOMANYREFS 59
+#define OSF1_ETIMEDOUT 60
+#define OSF1_ECONNREFUSED 61
+#define OSF1_ELOOP 62
+#define OSF1_ENAMETOOLONG 63
+#define OSF1_EHOSTDOWN 64
+#define OSF1_EHOSTUNREACH 65
+#define OSF1_ENOTEMPTY 66
+#define OSF1_EPROCLIM 67
+#define OSF1_EUSERS 68
+#define OSF1_EDQUOT 69
+#define OSF1_ESTALE 70
+#define OSF1_EREMOTE 71
+#define OSF1_EBADRPC 72
+#define OSF1_ERPCMISMATCH 73
+#define OSF1_EPROGUNAVAIL 74
+#define OSF1_EPROGMISMATCH 75
+#define OSF1_EPROCUNAVAIL 76
+#define OSF1_ENOLCK 77
+#define OSF1_ENOSYS 78
+#define OSF1_EFTYPE 79
+#define OSF1_ENOMSG 80
+#define OSF1_EIDRM 81
+#define OSF1_ENOSR 82
+#define OSF1_ETIME 83
+#define OSF1_EBADMSG 84
+#define OSF1_EPROTO 85
+#define OSF1_ENODATA 86
+#define OSF1_ENOSTR 87
+#define OSF1_ECLONEME 88
+#define OSF1_EDIRTY 89
+#define OSF1_EDUPPKG 90
+#define OSF1_EVERSION 91
+#define OSF1_ENOPKG 92
+#define OSF1_ENOSYM 93
+#define OSF1_ECANCELED 94
+#define OSF1_EFAIL 95
+#define OSF1_EINPROG 97
+#define OSF1_EMTIMERS 98
+#define OSF1_ENOTSUP 99
+#define OSF1_EAIO 100
+#define OSF1_EMULTIHOP 101
+#define OSF1_ENOLINK 102
+#define OSF1_EOVERFLOW 103
+#define OSF1_EILSEQ 116
+#define OSF1_ESOFT 123
+#define OSF1_EMEDIA 124
+
+extern int netbsd_to_osf1_errno[];
+
+#endif /* _OSF1_ERRNO_H_ */
Home |
Main Index |
Thread Index |
Old Index