entered into RCS
authorroland <roland>
Tue, 6 Oct 1992 18:29:52 +0000 (18:29 +0000)
committerroland <roland>
Tue, 6 Oct 1992 18:29:52 +0000 (18:29 +0000)
mach/err_boot.sub [new file with mode: 0644]
mach/err_ipc.sub [new file with mode: 0644]
mach/err_mach.sub [new file with mode: 0644]
mach/err_server.sub [new file with mode: 0644]
mach/mach_error.c [new file with mode: 0644]

diff --git a/mach/err_boot.sub b/mach/err_boot.sub
new file mode 100644 (file)
index 0000000..5393ab1
--- /dev/null
@@ -0,0 +1,63 @@
+/* 
+ * Mach Operating System
+ * Copyright (c) 1992 Carnegie Mellon University
+ * All Rights Reserved.
+ * 
+ * Permission to use, copy, modify and distribute this software and its
+ * documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ * 
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
+ * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
+ * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ * 
+ * Carnegie Mellon requests users of this software to return to
+ * 
+ *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
+ *  School of Computer Science
+ *  Carnegie Mellon University
+ *  Pittsburgh PA 15213-3890
+ * 
+ * any improvements or extensions that they make and grant Carnegie Mellon 
+ * the rights to redistribute these changes.
+ */
+/*
+ * HISTORY
+ * $Log$
+ * Revision 1.1  1992/10/06 18:29:52  roland
+ * entered into RCS
+ *
+ * Revision 2.2  92/04/01  19:37:59  rpd
+ *     Created.
+ *     [92/03/09            rpd]
+ * 
+ */
+/*
+ *     File:   err_bootstrap.sub
+ *     Author: Richard Draves, Carnegie Mellon University
+ *     Date:   March 9, 1992
+ *
+ *     Error string definitions for bootstrap
+ */
+
+static char * err_codes_bootstrap_fs[] = {
+       /* 0 */ "(bootstrap/fs) not a directory",
+       /* 1 */ "(bootstrap/fs) name not found",
+       /* 2 */ "(bootstrap/fs) name too long",
+       /* 3 */ "(bootstrap/fs) symbolic link loop",
+       /* 4 */ "(bootstrap/fs) bad file system",
+       /* 5 */ "(bootstrap/fs) offset not in file",
+       /* 6 */ "(bootstrap/fs) invalid parameter",
+};
+
+/*     err_bootstrap subsystems        */
+static struct error_subsystem err_bootstrap_sub[] = {
+       /* bootstrap/0; */
+       {
+               "(bootstrap/fs)",
+               errlib_count(err_codes_bootstrap_fs),
+               err_codes_bootstrap_fs,
+       },
+};
diff --git a/mach/err_ipc.sub b/mach/err_ipc.sub
new file mode 100644 (file)
index 0000000..1de186e
--- /dev/null
@@ -0,0 +1,109 @@
+/* 
+ * Mach Operating System
+ * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
+ * All Rights Reserved.
+ * 
+ * Permission to use, copy, modify and distribute this software and its
+ * documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ * 
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS 
+ * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
+ * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ * 
+ * Carnegie Mellon requests users of this software to return to
+ * 
+ *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
+ *  School of Computer Science
+ *  Carnegie Mellon University
+ *  Pittsburgh PA 15213-3890
+ * 
+ * any improvements or extensions that they make and grant Carnegie the
+ * rights to redistribute these changes.
+ */
+/*
+ * HISTORY
+ * $Log$
+ * Revision 1.1  1992/10/06 18:29:52  roland
+ * entered into RCS
+ *
+ * Revision 2.2  92/01/16  00:08:40  rpd
+ *     Moved from user collection to mk collection.
+ * 
+ * Revision 2.2  91/03/27  16:05:16  mrt
+ *     First checkin
+ * 
+ * 
+ */
+/*
+ *     File:   err_ipc.sub
+ *     Author: Douglas Orr, Carnegie Mellon University
+ *     Date:   Mar, 1988
+ *
+ *     Definitions of error strings for original IPC
+ */
+
+static char * err_codes_send[] = {
+       "(ipc/send) unknown error",             /* -100 */
+       "(ipc/send) invalid memory",            /* -101 */
+       "(ipc/send) invalid port",              /* -102 */
+       "(ipc/send) timed out",                 /* -103 */
+       "(ipc/send) unused error",              /* -104 */
+       "(ipc/send) will notify",               /* -105 */
+       "(ipc/send) notify in progress",        /* -106 */      
+       "(ipc/send) kernel refused message",    /* -107 */
+       "(ipc/send) send interrupted",          /* -108 */
+       "(ipc/send) send message too large",    /* -109 */
+       "(ipc/send) send message too small",    /* -110 */
+       "(ipc/send) message size changed while being copied",   /* -111 */
+};
+
+static char * err_codes_rcv[] = {
+       "(ipc/rcv) unknown error",                      /* -200 */
+       "(ipc/rcv) invalid memory",                     /* -201 */
+       "(ipc/rcv) invalid port",                       /* -202 */
+       "(ipc/rcv) receive timed out",                  /* -203 */
+       "(ipc/rcv) message too large",                  /* -204 */
+       "(ipc/rcv) no space for message data",          /* -205 */
+       "(ipc/rcv) only sender remaining",              /* -206 */
+       "(ipc/rcv) receive interrupted",                /* -207 */
+       "(ipc/rcv) port receiver changed or port became enabled", /* -208 */
+};
+
+static char    * err_codes_mig[] = {
+       "(ipc/mig) type check failure in message interface",    /* 0 (-300) */
+       "(ipc/mig) wrong return message ID",                    /* 1 */
+       "(ipc/mig) server detected error",                      /* 2 */
+       "(ipc/mig) bad message ID",                             /* 3 */
+       "(ipc/mig) server found wrong arguments",               /* 4 */
+       "(ipc/mig) no reply should be sent",                    /* 5 */
+       "(ipc/mig) server raised exception",                    /* 6 */
+       "(ipc/mig) user specified array not large enough for return info",      /* 7 */
+};
+
+/*     err_ipc subsystems              */
+static struct error_subsystem err_ipc_sub[] = {
+       /* ipc/0; */
+       {
+               "(ipc/send)",
+               errlib_count(err_codes_send),
+               err_codes_send,
+       },
+       /* ipc/1; */
+       {
+               "(ipc/rcv)",
+               errlib_count(err_codes_rcv),
+               err_codes_rcv,
+
+       },
+       /* ipc/2 */
+       {
+               "(ipc/mig)",
+               errlib_count(err_codes_mig),
+               err_codes_mig,
+       },
+
+};
+
diff --git a/mach/err_mach.sub b/mach/err_mach.sub
new file mode 100644 (file)
index 0000000..b33522c
--- /dev/null
@@ -0,0 +1,130 @@
+/* 
+ * Mach Operating System
+ * Copyright (c) 1991,1990,1989 Carnegie Mellon University
+ * All Rights Reserved.
+ * 
+ * Permission to use, copy, modify and distribute this software and its
+ * documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ * 
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS 
+ * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
+ * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ * 
+ * Carnegie Mellon requests users of this software to return to
+ * 
+ *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
+ *  School of Computer Science
+ *  Carnegie Mellon University
+ *  Pittsburgh PA 15213-3890
+ * 
+ * any improvements or extensions that they make and grant Carnegie the
+ * rights to redistribute these changes.
+ */
+/*
+ * HISTORY
+ * $Log$
+ * Revision 1.1  1992/10/06 18:29:52  roland
+ * entered into RCS
+ *
+ * Revision 2.3  92/04/01  19:38:05  rpd
+ *     Added MIG_DESTROY_REQUEST.
+ *     [92/03/09            rpd]
+ * 
+ * Revision 2.2  92/01/16  00:09:05  rpd
+ *     Moved from user collection to mk collection.
+ * 
+ * Revision 2.3  91/08/29  15:51:30  rpd
+ *     Added MIG_SERVER_DIED.
+ *     [91/08/21            rpd]
+ * 
+ * Revision 2.2  91/03/27  16:05:37  mrt
+ *     First checkin
+ * 
+ * Revision 2.2  91/03/18  17:39:03  rpd
+ *     Created.
+ *     [91/03/18            rpd]
+ * 
+ */
+/*
+ *     File:   err_mach_ipc.sub
+ *     Author: Richard Draves, Carnegie Mellon University
+ *     Date:   Jan, 1990
+ *
+ *     Error string definitions for the new Mach IPC
+ */
+
+static char * err_codes_mach_send[] = {
+       /* 0 */ "(ipc/send) no error",
+       /* 1 */ "(ipc/send) send in progress",
+       /* 2 */ "(ipc/send) invalid data",
+       /* 3 */ "(ipc/send) invalid destination port",
+       /* 4 */ "(ipc/send) timed out",
+       /* 5 */ "(ipc/send) will notify",
+       /* 6 */ "(ipc/send) notify in progress",
+       /* 7 */ "(ipc/send) interrupted",
+       /* 8 */ "(ipc/send) msg too small",
+       /* 9 */ "(ipc/send) invalid reply port",
+       /* 10 */        "(ipc/send) invalid port right",
+       /* 11 */        "(ipc/send) invalid notify port",
+       /* 12 */        "(ipc/send) invalid memory",
+       /* 13 */        "(ipc/send) no msg buffer",
+       /* 14 */        "(ipc/send) no notify possible",
+       /* 15 */        "(ipc/send) invalid msg-type",
+       /* 16 */        "(ipc/send) invalid msg-header",
+};
+
+static char * err_codes_mach_rcv[] = {
+       /* 0 */ "(ipc/rcv) no error",
+       /* 1 */ "(ipc/rcv) receive in progress",
+       /* 2 */ "(ipc/rcv) invalid name",
+       /* 3 */ "(ipc/rcv) timed out",
+       /* 4 */ "(ipc/rcv) msg too large",
+       /* 5 */ "(ipc/rcv) interrupted",
+       /* 6 */ "(ipc/rcv) port changed",
+       /* 7 */ "(ipc/rcv) invalid notify port",
+       /* 8 */ "(ipc/rcv) invalid data",
+       /* 9 */ "(ipc/rcv) port died",
+       /* 10 */        "(ipc/rcv) port in set",
+       /* 11 */        "(ipc/rcv) header error",
+       /* 12 */        "(ipc/rcv) body error",
+};
+
+static char    * err_codes_mach_mig[] = {
+       /* 0 */ "(ipc/mig) client type check failure",
+       /* 1 */ "(ipc/mig) wrong reply message ID",
+       /* 2 */ "(ipc/mig) server detected error",
+       /* 3 */ "(ipc/mig) bad request message ID",
+       /* 4 */ "(ipc/mig) server type check failure",
+       /* 5 */ "(ipc/mig) no reply should be sent",
+       /* 6 */ "(ipc/mig) server raised exception",
+       /* 7 */ "(ipc/mig) array not large enough",
+       /* 8 */ "(ipc/mig) server died",
+       /* 9 */ "(ipc/mig) destroy request with no reply",
+};
+
+/*     err_mach_ipc subsystems         */
+static struct error_subsystem err_mach_ipc_sub[] = {
+       /* ipc/0; */
+       {
+               "(ipc/send)",
+               errlib_count(err_codes_mach_send),
+               err_codes_mach_send,
+       },
+       /* ipc/1; */
+       {
+               "(ipc/rcv)",
+               errlib_count(err_codes_mach_rcv),
+               err_codes_mach_rcv,
+
+       },
+       /* ipc/2 */
+       {
+               "(ipc/mig)",
+               errlib_count(err_codes_mach_mig),
+               err_codes_mach_mig,
+       },
+
+};
diff --git a/mach/err_server.sub b/mach/err_server.sub
new file mode 100644 (file)
index 0000000..1594246
--- /dev/null
@@ -0,0 +1,374 @@
+/* 
+ * Mach Operating System
+ * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University
+ * All Rights Reserved.
+ * 
+ * Permission to use, copy, modify and distribute this software and its
+ * documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ * 
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS 
+ * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
+ * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ * 
+ * Carnegie Mellon requests users of this software to return to
+ * 
+ *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
+ *  School of Computer Science
+ *  Carnegie Mellon University
+ *  Pittsburgh PA 15213-3890
+ * 
+ * any improvements or extensions that they make and grant Carnegie the
+ * rights to redistribute these changes.
+ */
+/*
+ * HISTORY
+ * $Log$
+ * Revision 1.1  1992/10/06 18:29:53  roland
+ * entered into RCS
+ *
+ * Revision 2.2  92/01/16  00:10:29  rpd
+ *     Moved from user collection to mk collection.
+ * 
+ * Revision 2.3  91/08/29  15:51:39  rpd
+ *     Fixed err_codes_netname.
+ *     [91/08/22            rpd]
+ * 
+ * Revision 2.2  91/03/27  16:05:51  mrt
+ *     First checkin
+ * 
+ * Revision 2.3  90/10/29  17:27:20  dpj
+ *     Merged-up to U25
+ *     [90/09/02  20:00:25  dpj]
+ * 
+ */
+/*
+ *     File:   err_server.sub
+ *     Author: Douglas Orr, Carnegie Mellon University
+ *     Date:   Mar, 1988
+ *
+ *     Definitions of Servers error strings
+ */
+
+static char * err_codes_netname[] = {                  /* 0 */
+               "(server/netname) name is not yours",
+               "(server/netname) name not checked in",
+               "(server/netname) no such host",
+               "(server/netname) host not found",
+};
+static char * err_codes_env_mgr[] = {                  /* 1 */
+               NO_SUCH_ERROR,
+               "(server/env_mgr) variable not found",
+               "(server/env_mgr) wrong type of variable",
+               "(server/env_mgr) unknown port",
+               "(server/env_mgr) read only environment",
+               "(server/env_mgr) no more connections available",
+               "(server/env_mgr) port table full",
+               "(server/env_mgr) attempting to enter a null port ",
+};
+static char * err_codes_execd[] = {                    /* 2 */
+               NO_SUCH_ERROR,
+               "(server/execd) could not find file to run",
+               "(server/execd) userid or password incorrect",
+               "(server/execd) fork failed",
+};
+static char * err_codes_netmemory[] = {                        /* 3 */
+               "(server/netmemory) successful",
+               "(server/netmemory) invalid argument",
+               "(server/netmemory) resource shortage",
+};
+static char * err_codes_ufs[] = {                      /* 4 */
+               NO_SUCH_ERROR,
+/* XXX         "(server/ufs) invalid port", */
+};
+
+static char * err_codes_task_master[] = {              /* 5 */
+               "(server/task_master) GENERIC ERROR",
+               "(server/task_master) invalid tm_task port",
+               "(server/task_master) invalid task id",
+               "(server/task_master) invalid kernel port",
+               "(server/task_master) invalid job group",
+               "(server/task_master) invalid action",
+};
+
+static char * err_codes_ns[] = {                       /* 6 */
+               "(server/ns) GENERIC ERROR",
+               "(server/ns) invalid handle",
+               "(server/ns) name not found",
+               "(server/ns) name already exists",
+               "(server/ns) name too long",
+               "(server/ns) path too long",
+               "(server/ns) invalid name",
+               "(server/ns) not a directory",
+               "(server/ns) is a directory",
+               "(server/ns) directory not empty",
+               "(server/ns) infinite retry loop in resolver",
+               "(server/ns) infinite forwarding loop in resolver",
+               "(server/ns) invalid prefix",
+               "(server/ns) prefix table overflow",
+               "(server/ns) bad format for directory",
+               "(server/ns) unknown entry type",
+               "(server/ns) invalid generation",
+               "(server/ns) entry not reserved",
+};
+
+static char    * err_codes_io[] = {                    /* 7 */
+               "(server/io) GENERIC ERROR",
+               "(server/io) invalid offset",
+               "(server/io) invalid size",
+               "(server/io) invalid mode",
+               "(server/io) invalid strategy",
+               "(server/io) operation rejected under current I/O strategy",
+};
+
+static char * err_codes_auth[] = {                     /* 8 */
+               "(server/auth) GENERIC ERROR",
+               "(server/auth) bad private port",
+               "(server/auth) bad name",
+               "(server/auth) not primary",
+               "(server/auth) bad pauthsword",
+               "(server/auth) bad group",
+               "(server/auth) duplicate id",
+               "(server/auth) duplicate name",
+               "(server/auth) not secondary",
+};
+
+static char * err_codes_us[] = {                       /* 9 */
+               "(server/us) GENERIC ERROR",
+               "(server/us) unknown error",
+               "(server/us) object not found",
+               "(server/us) object exists",
+               "(server/us) object busy",
+               "(server/us) object not started",
+               "(server/us) object dead",
+               "(server/us) invalid args",
+               "(server/us) invalid access",
+               "(server/us) invalid format",
+               "(server/us) invalid buffer size",
+               "(server/us) access denied",
+               "(server/us) resource exhausted",
+               "(server/us) quota exceeded",
+               "(server/us) limit exceeded",
+               "(server/us) not implemented",
+               "(server/us) not supported",
+               "(server/us) hardware error",
+               "(server/us) retry required",
+               "(server/us) not authenticated",
+               "(server/us) exclusive access",
+               "(server/us) timeout",
+               "(server/us) bad reference count",
+               "(server/us) internal error",
+};
+
+static char * err_codes_sunrpc[] = {                   /* 10 */
+               "(server/sunrpc) GENERIC ERROR",
+               "(server/sunrpc) cannot encode arguments",
+               "(server/sunrpc) cannot decode results",
+               "(server/sunrpc) failure in sending call",
+               "(server/sunrpc) failure in receiving result",
+               "(server/sunrpc) call timed out",
+               "(server/sunrpc) rpc versions not compatible",
+               "(server/sunrpc) authentication error",
+               "(server/sunrpc) program not available",
+               "(server/sunrpc) program version mismatched",
+               "(server/sunrpc) procedure unavailable",
+               "(server/sunrpc) decode arguments error",
+               "(server/sunrpc) generic other problem",
+               "(server/sunrpc) unknown host name",
+               "(server/sunrpc) portmapper failed",
+               "(server/sunrpc) remote program not registered",
+               "(server/sunrpc) unspecified error",
+               "(server/sunrpc) unknown protocol",
+};
+
+static char    * err_codes_machobj[] = {               /* 11 */
+               "(server/object system) GENERIC ERROR",
+               "(server/object system) object not found",
+               "(server/object system) no such operation",
+               "(server/object system) undefined ipc method arguments",
+               "(server/object system) too many arguments to method",
+               "(server/object system) bad ipc message format",
+};
+
+static char    * err_codes_loader[] = {                /* 12 */
+               "(server/loader) GENERIC ERROR",
+               "(server/loader) object file not relocated",
+               "(server/loader) unknown file type",
+               "(server/loader) symbol not found",
+               "(server/loader) symbol multiply defined",
+               "(server/loader) memory region overlap",
+};
+
+
+static char    * err_codes_exception[] = {             /* 13 */
+       "(server/exception) GENERIC ERROR",
+       "(server/exception) invalid access",
+       "(server/exception) invalid instruction",
+       "(server/exception) arithmetic exception",
+       "(server/exception) emulation exception",
+       "(server/exception) software exception",
+       "(server/exception) breakpoint exception",
+};
+
+static char    * err_codes_ux_signal[] = {             /* 14 */
+       "(server/unix-signal) GENERIC ERROR",
+       "(server/unix-signal) hangup",
+       "(server/unix-signal) interrupt",
+       "(server/unix-signal) quit",
+       "(server/unix-signal) undefined",
+       "(server/unix-signal) undefined",
+       "(server/unix-signal) undefined",
+       "(server/unix-signal) undefined",
+       "(server/unix-signal) kill",
+       "(server/unix-signal) undefined",
+       "(server/unix-signal) undefined",
+       "(server/unix-signal) system error",
+       "(server/unix-signal) pipe signal",
+       "(server/unix-signal) alarm",
+       "(server/unix-signal) terminate",
+       "(server/unix-signal) urgent i/o",
+       "(server/unix-signal) stop",
+       "(server/unix-signal) terminal stop",
+       "(server/unix-signal) continue",
+       "(server/unix-signal) child death",
+       "(server/unix-signal) tty input",
+       "(server/unix-signal) tty output",
+       "(server/unix-signal) i/o signal",
+       "(server/unix-signal) cpu time limit exceeded",
+       "(server/unix-signal) file size exceeded",
+       "(server/unix-signal) virtual alarm",
+       "(server/unix-signal) profile signal",
+       "(server/unix-signal) window size change",
+       "(server/unix-signal) user-defined signal 1",
+       "(server/unix-signal) user-defined signal 2",
+};
+
+static char    * err_codes_xkernel[] = {               /* 15 */
+       "(server/xkernel) GENERIC ERROR",
+       "(server/xkernel) map full",
+       "(server/xkernel) inconsistent bind",
+       "(server/xkernel) cannot resolve",
+       "(server/xkernel) cannot unbind",
+       "(server/xkernel) invalid type",
+       "(server/xkernel) invalid opcode",
+       "(server/xkernel) buffer too small",
+       "(server/xkernel) invalid ev code",
+       "(server/xkernel) event not registered",
+       "(server/xkernel) invalid open",
+       "(server/xkernel) already open",
+       "(server/xkernel) bad addr",
+};
+
+
+/*     err_server subsystems           */
+static struct error_subsystem err_server_sub[] = {
+       /* server/0; */
+       {
+               "(server/netname)",
+               errlib_count(err_codes_netname),
+               err_codes_netname,
+       },
+       /* server/1; */
+       {
+               "(server/env_mgr)",
+               errlib_count(err_codes_env_mgr),
+               err_codes_env_mgr,
+       },
+       /* server/2; */
+       {
+               "(server/execd)",
+               errlib_count(err_codes_execd),
+               err_codes_execd,
+       },
+       /* server/3; */
+       {
+               "(server/netmemory)",
+               errlib_count(err_codes_netmemory),
+               err_codes_netmemory,
+       },
+       /* server/4; */
+       {
+               "(server/ufs)",
+               errlib_count(err_codes_ufs),
+               err_codes_ufs,
+       },
+       /* server/5; */
+       {
+               "(server/task_master)",
+               errlib_count(err_codes_task_master),
+               err_codes_task_master,
+       },
+       /* server/6; */
+       {
+               "(server/ns)",
+               errlib_count(err_codes_ns),
+               err_codes_ns,
+       },
+
+       /* server/7; i/o subsystem */
+       {
+               "(server/io)",
+               errlib_count(err_codes_io),
+               err_codes_io,
+       },
+
+       /* server/8; authentication server */
+       {
+               "(server/auth)",
+               errlib_count(err_codes_auth),
+               err_codes_auth,
+       },
+
+       /* server/9; generic US system */
+       {
+               "(server/us)",
+               errlib_count(err_codes_us),
+               err_codes_us,
+       },
+
+       /* server/10; SUN RPC package */
+       {
+               "(server/sunrpc)",
+               errlib_count(err_codes_sunrpc),
+               err_codes_sunrpc,
+       },
+
+       /* server/11; MachObject system */
+       {
+               "(server/object system)",
+               errlib_count(err_codes_machobj),
+               err_codes_machobj,
+       },
+
+       /* server/12; loader */
+       {
+               "(server/loader)",
+               errlib_count(err_codes_loader),
+               err_codes_loader,
+       },
+
+       /* server/13; mach exception */
+       {
+               "(server/exception)",
+               errlib_count(err_codes_exception),
+               err_codes_exception,
+       },
+
+       /* server/14; unix signal */
+       {
+               "(server/unix-signal)",
+               errlib_count(err_codes_ux_signal),
+               err_codes_ux_signal,
+       },
+
+       /* server/15; xkernel */
+       {
+               "(server/xkernel)",
+               errlib_count(err_codes_xkernel),
+               err_codes_xkernel,
+       },
+
+};
+
diff --git a/mach/mach_error.c b/mach/mach_error.c
new file mode 100644 (file)
index 0000000..6cac0a5
--- /dev/null
@@ -0,0 +1,85 @@
+/* 
+ * Mach Operating System
+ * Copyright (c) 1991,1990,1989 Carnegie Mellon University
+ * All Rights Reserved.
+ * 
+ * Permission to use, copy, modify and distribute this software and its
+ * documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ * 
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
+ * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
+ * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ * 
+ * Carnegie Mellon requests users of this software to return to
+ * 
+ *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
+ *  School of Computer Science
+ *  Carnegie Mellon University
+ *  Pittsburgh PA 15213-3890
+ * 
+ * any improvements or extensions that they make and grant Carnegie Mellon
+ * the rights to redistribute these changes.
+ */
+/*
+ * HISTORY
+ * $Log$
+ * Revision 1.1  1992/10/06 18:29:54  roland
+ * entered into RCS
+ *
+ * Revision 2.4  92/02/19  15:10:52  elf
+ *     Moved mach_error_string and mach_error_type to mach_error_string.c.
+ *     [92/02/11            rpd]
+ * 
+ * Revision 2.3  92/01/23  15:22:06  rpd
+ *     Changed <servers/errorlib.h> to <errorlib.h>.
+ *     [92/01/16            rpd]
+ * 
+ * Revision 2.2  92/01/16  00:08:03  rpd
+ *     Moved from user collection to mk collection.
+ * 
+ * Revision 2.3  91/08/29  15:51:50  rpd
+ *     Changed IPC_MIG_MOD to MACH_IPC_MIG_MOD, to get the new error strings.
+ *     [91/08/22            rpd]
+ * 
+ * Revision 2.2  91/03/27  16:06:29  mrt
+ *     Changed include of "errorlib.h" to <servers/errorlib.h>
+ *     Added new copyright
+ *     [91/03/20            mrt]
+ * 
+ */
+/*
+ *     File:   mach_error.c
+ *     Author: Douglas Orr, Carnegie Mellon University
+ *     Date:   Mar 1988
+ *
+ *      interprets structured mach error codes and prints
+ *      or returns a descriptive string.
+ */
+
+#include <stdio.h>
+#include <mach_error.h>
+#include <mach/boolean.h>
+
+extern char * mach_error_string_int();
+
+void
+mach_error( str, err ) 
+       char    *str;
+       mach_error_t            err;
+{
+       char * err_str;
+       char buf[1024];
+       boolean_t diag;
+
+       err_str=mach_error_string_int(err, &diag);
+
+       if ( diag ) {
+               sprintf( buf, "%s %s (%x)", mach_error_type(err), err_str, err );
+               err_str = buf;
+       }
+
+       fprintf(stderr, "%s %s\n", str, err_str);
+}