]> git.saurik.com Git - apple/libc.git/blob - mach.subproj/error_codes.c
Libc-166.tar.gz
[apple/libc.git] / mach.subproj / error_codes.c
1 /*
2 * @OSF_COPYRIGHT@
3 */
4 /*
5 * Mach Operating System
6 * Copyright (c) 1991,1990,1989 Carnegie Mellon University
7 * All Rights Reserved.
8 *
9 * Permission to use, copy, modify and distribute this software and its
10 * documentation is hereby granted, provided that both the copyright
11 * notice and this permission notice appear in all copies of the
12 * software, derivative works or modified versions, and any portions
13 * thereof, and that both notices appear in supporting documentation.
14 *
15 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
16 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
17 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
18 *
19 * Carnegie Mellon requests users of this software to return to
20 *
21 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
22 * School of Computer Science
23 * Carnegie Mellon University
24 * Pittsburgh PA 15213-3890
25 *
26 * any improvements or extensions that they make and grant Carnegie the
27 * rights to redistribute these changes.
28 */
29
30 /*
31 * File: error_codes.c
32 * Author: Douglas Orr, Carnegie Mellon University
33 * Date: Mar, 1988
34 *
35 * Generic error code interface
36 */
37
38 #include <mach/error.h>
39 #include <mach/errorlib.h>
40 #include "err_kern.sub"
41 #include "err_us.sub"
42 #include "err_server.sub"
43 #include "err_ipc.sub"
44 #include "err_mach_ipc.sub"
45
46 struct error_system errors[err_max_system+1] = {
47 /* 0; err_kern */
48 {
49 errlib_count(err_os_sub),
50 (char *)"(operating system/?) unknown subsystem error",
51 err_os_sub,
52 },
53 /* 1; err_us */
54 {
55 errlib_count(err_us_sub),
56 (char *)"(user space/?) unknown subsystem error",
57 err_us_sub,
58 },
59 /* 2; err_server */
60 {
61 errlib_count(err_server_sub),
62 (char *)"(server/?) unknown subsystem error",
63 err_server_sub,
64 },
65 /* 3 (& 3f); err_ipc */
66 {
67 errlib_count(err_ipc_sub),
68 (char *)"(ipc/?) unknown subsystem error",
69 err_ipc_sub,
70 },
71 /* 4; err_mach_ipc */
72 {
73 errlib_count(err_mach_ipc_sub),
74 (char *)"(ipc/?) unknown subsystem error",
75 err_mach_ipc_sub,
76 },
77 };
78
79 int error_system_count = errlib_count(errors);