]>
Commit | Line | Data |
---|---|---|
28f540f4 RM |
1 | /* |
2 | * Mach Operating System | |
3 | * Copyright (c) 1991,1990,1989 Carnegie Mellon University | |
4 | * All Rights Reserved. | |
5 | * | |
6 | * Permission to use, copy, modify and distribute this software and its | |
7 | * documentation is hereby granted, provided that both the copyright | |
8 | * notice and this permission notice appear in all copies of the | |
9 | * software, derivative works or modified versions, and any portions | |
10 | * thereof, and that both notices appear in supporting documentation. | |
11 | * | |
12 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS | |
13 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR | |
14 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. | |
15 | * | |
16 | * Carnegie Mellon requests users of this software to return to | |
17 | * | |
18 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | |
19 | * School of Computer Science | |
20 | * Carnegie Mellon University | |
21 | * Pittsburgh PA 15213-3890 | |
22 | * | |
23 | * any improvements or extensions that they make and grant Carnegie the | |
24 | * rights to redistribute these changes. | |
25 | */ | |
26 | /* | |
27 | * HISTORY | |
28 | * $Log$ | |
424f8c09 RM |
29 | * Revision 1.5 1995/03/10 23:57:44 roland |
30 | * (errors): Use const for decl. | |
31 | * | |
32 | * Revision 1.4 1993/12/17 21:56:16 roland | |
28f540f4 RM |
33 | * entered into RCS |
34 | * | |
35 | * Revision 2.3 92/03/31 15:18:52 rpd | |
36 | * Added KERN_DEVICE_MOD for device errors. | |
37 | * [92/03/09 rpd] | |
38 | * | |
39 | * Revision 2.2 92/01/16 00:21:17 rpd | |
40 | * Moved from user collection to mk collection. | |
41 | * | |
42 | * Revision 2.2 91/03/27 15:37:37 mrt | |
43 | * First checkin | |
44 | * | |
45 | */ | |
46 | /* | |
47 | * File: errorlib.h | |
48 | * Author: Douglas Orr, Carnegie Mellon University | |
49 | * Date: Mar. 1988 | |
50 | * | |
51 | * Error bases for subsytems errors. | |
52 | */ | |
53 | ||
54 | #include <mach/error.h> | |
55 | ||
56 | #define KERN_DEVICE_MOD (err_kern|err_sub(1)) | |
57 | ||
58 | #define BOOTSTRAP_FS_MOD (err_bootstrap|err_sub(0)) | |
59 | ||
60 | #define MACH_IPC_SEND_MOD (err_mach_ipc|err_sub(0)) | |
61 | #define MACH_IPC_RCV_MOD (err_mach_ipc|err_sub(1)) | |
62 | #define MACH_IPC_MIG_MOD (err_mach_ipc|err_sub(2)) | |
63 | ||
64 | #define IPC_SEND_MOD (err_ipc|err_sub(0)) | |
65 | #define IPC_RCV_MOD (err_ipc|err_sub(1)) | |
66 | #define IPC_MIG_MOD (err_ipc|err_sub(2)) | |
67 | ||
68 | #define SERV_NETNAME_MOD (err_server|err_sub(0)) | |
69 | #define SERV_ENV_MOD (err_server|err_sub(1)) | |
70 | #define SERV_EXECD_MOD (err_server|err_sub(2)) | |
71 | ||
72 | ||
73 | #define NO_SUCH_ERROR "unknown error code" | |
74 | ||
75 | struct error_subsystem { | |
76 | const char * subsys_name; | |
77 | int max_code; | |
78 | const char * const * codes; | |
79 | }; | |
80 | ||
81 | struct error_system { | |
82 | int max_sub; | |
83 | const char * bad_sub; | |
84 | const struct error_subsystem * subsystem; | |
85 | }; | |
86 | ||
87 | #define errors __mach_error_systems | |
424f8c09 | 88 | extern const struct error_system errors[err_max_system+1]; |
28f540f4 RM |
89 | |
90 | #define errlib_count(s) (sizeof(s)/sizeof(s[0])) |