]> git.saurik.com Git - apple/xnu.git/blob - libsyscall/mach/error_codes.c
xnu-1228.0.2.tar.gz
[apple/xnu.git] / libsyscall / mach / error_codes.c
1 /*
2 * Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. The rights granted to you under the License
10 * may not be used to create, or enable the creation or redistribution of,
11 * unlawful or unlicensed copies of an Apple operating system, or to
12 * circumvent, violate, or enable the circumvention or violation of, any
13 * terms of an Apple operating system software license agreement.
14 *
15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
17 *
18 * The Original Code and all software distributed under the License are
19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23 * Please see the License for the specific language governing rights and
24 * limitations under the License.
25 *
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
27 */
28 /*
29 * @OSF_COPYRIGHT@
30 */
31 /*
32 * Mach Operating System
33 * Copyright (c) 1991,1990,1989 Carnegie Mellon University
34 * All Rights Reserved.
35 *
36 * Permission to use, copy, modify and distribute this software and its
37 * documentation is hereby granted, provided that both the copyright
38 * notice and this permission notice appear in all copies of the
39 * software, derivative works or modified versions, and any portions
40 * thereof, and that both notices appear in supporting documentation.
41 *
42 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS
43 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
44 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
45 *
46 * Carnegie Mellon requests users of this software to return to
47 *
48 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
49 * School of Computer Science
50 * Carnegie Mellon University
51 * Pittsburgh PA 15213-3890
52 *
53 * any improvements or extensions that they make and grant Carnegie the
54 * rights to redistribute these changes.
55 */
56
57 /*
58 * File: error_codes.c
59 * Author: Douglas Orr, Carnegie Mellon University
60 * Date: Mar, 1988
61 *
62 * Generic error code interface
63 */
64
65 #include <mach/error.h>
66 #include "errorlib.h"
67 #include "err_iokit.sub"
68 #include "err_ipc.sub"
69 #include "err_kern.sub"
70 #include "err_mach_ipc.sub"
71 #include "err_server.sub"
72 #include "err_us.sub"
73
74 __private_extern__ struct error_system _mach_errors[err_max_system+1] = {
75 /* 0; err_kern */
76 {
77 errlib_count(err_os_sub),
78 "(operating system/?) unknown subsystem error",
79 err_os_sub,
80 },
81 /* 1; err_us */
82 {
83 errlib_count(err_us_sub),
84 "(user space/?) unknown subsystem error",
85 err_us_sub,
86 },
87 /* 2; err_server */
88 {
89 errlib_count(err_server_sub),
90 "(server/?) unknown subsystem error",
91 err_server_sub,
92 },
93 /* 3 (& 3f); err_ipc */
94 {
95 errlib_count(err_ipc_sub),
96 "(ipc/?) unknown subsystem error",
97 err_ipc_sub,
98 },
99 /* 4; err_mach_ipc */
100 {
101 errlib_count(err_mach_ipc_sub),
102 "(ipc/?) unknown subsystem error",
103 err_mach_ipc_sub,
104 },
105
106 /* 0x05 */ errorlib_system_null,
107 /* 0x06 */ errorlib_system_null, /* 0x07 */ errorlib_system_null,
108 /* 0x08 */ errorlib_system_null, /* 0x09 */ errorlib_system_null,
109 /* 0x0a */ errorlib_system_null, /* 0x0b */ errorlib_system_null,
110 /* 0x0c */ errorlib_system_null, /* 0x0d */ errorlib_system_null,
111 /* 0x0e */ errorlib_system_null, /* 0x0f */ errorlib_system_null,
112
113 /* 0x10 */ errorlib_system_null, /* 0x11 */ errorlib_system_null,
114 /* 0x12 */ errorlib_system_null, /* 0x13 */ errorlib_system_null,
115 /* 0x14 */ errorlib_system_null, /* 0x15 */ errorlib_system_null,
116 /* 0x16 */ errorlib_system_null, /* 0x17 */ errorlib_system_null,
117 /* 0x18 */ errorlib_system_null, /* 0x19 */ errorlib_system_null,
118 /* 0x1a */ errorlib_system_null, /* 0x1b */ errorlib_system_null,
119 /* 0x1c */ errorlib_system_null, /* 0x1d */ errorlib_system_null,
120 /* 0x1e */ errorlib_system_null, /* 0x1f */ errorlib_system_null,
121
122 /* 0x20 */ errorlib_system_null, /* 0x21 */ errorlib_system_null,
123 /* 0x22 */ errorlib_system_null, /* 0x23 */ errorlib_system_null,
124 /* 0x24 */ errorlib_system_null, /* 0x25 */ errorlib_system_null,
125 /* 0x26 */ errorlib_system_null, /* 0x27 */ errorlib_system_null,
126 /* 0x28 */ errorlib_system_null, /* 0x29 */ errorlib_system_null,
127 /* 0x2a */ errorlib_system_null, /* 0x2b */ errorlib_system_null,
128 /* 0x2c */ errorlib_system_null, /* 0x2d */ errorlib_system_null,
129 /* 0x2e */ errorlib_system_null, /* 0x2f */ errorlib_system_null,
130
131 /* 0x30 */ errorlib_system_null, /* 0x31 */ errorlib_system_null,
132 /* 0x32 */ errorlib_system_null, /* 0x33 */ errorlib_system_null,
133 /* 0x34 */ errorlib_system_null, /* 0x35 */ errorlib_system_null,
134 /* 0x36 */ errorlib_system_null, /* 0x37 */ errorlib_system_null,
135
136 /* 0x38; err_iokit */
137 {
138 errlib_count(err_iokit_sub),
139 "(iokit/?) unknown subsystem error",
140 err_iokit_sub,
141 err_iokit_sub_map,
142 errlib_count(err_iokit_sub_map)
143 },
144
145 /* 0x39 */ errorlib_system_null,
146 /* 0x3a */ errorlib_system_null, /* 0x3b */ errorlib_system_null,
147 /* 0x3c */ errorlib_system_null, /* 0x3d */ errorlib_system_null,
148 /* 0x3e */ errorlib_system_null, /* 0x3f */ errorlib_system_null,
149 };
150
151 // int error_system_count = errlib_count(_mach_errors);