]>
Commit | Line | Data |
---|---|---|
e9ce8d39 A |
1 | /* |
2 | * @OSF_COPYRIGHT@ | |
3 | */ | |
4 | ||
5 | /* | |
6 | * Mach Operating System | |
7 | * Copyright (c) 1991,1990,1989 Carnegie Mellon University | |
8 | * All Rights Reserved. | |
9 | * | |
10 | * Permission to use, copy, modify and distribute this software and its | |
11 | * documentation is hereby granted, provided that both the copyright | |
12 | * notice and this permission notice appear in all copies of the | |
13 | * software, derivative works or modified versions, and any portions | |
14 | * thereof, and that both notices appear in supporting documentation. | |
15 | * | |
16 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS | |
17 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR | |
18 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. | |
19 | * | |
20 | * Carnegie Mellon requests users of this software to return to | |
21 | * | |
22 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | |
23 | * School of Computer Science | |
24 | * Carnegie Mellon University | |
25 | * Pittsburgh PA 15213-3890 | |
26 | * | |
27 | * any improvements or extensions that they make and grant Carnegie the | |
28 | * rights to redistribute these changes. | |
29 | */ | |
30 | ||
31 | /* | |
32 | * File: errorlib.h | |
33 | * Author: Douglas Orr, Carnegie Mellon University | |
34 | * Date: Mar. 1988 | |
35 | * | |
36 | * Error bases for subsytems errors. | |
37 | */ | |
38 | ||
39 | #include <mach/error.h> | |
5b2abdfb | 40 | #include <mach/boolean.h> |
e9ce8d39 A |
41 | |
42 | #define MACH_IPC_SEND_MOD (err_mach_ipc|err_sub(0)) | |
43 | #define MACH_IPC_RCV_MOD (err_mach_ipc|err_sub(1)) | |
44 | #define MACH_IPC_MIG_MOD (err_mach_ipc|err_sub(2)) | |
45 | ||
46 | #define IPC_SEND_MOD (err_ipc|err_sub(0)) | |
47 | #define IPC_RCV_MOD (err_ipc|err_sub(1)) | |
48 | #define IPC_MIG_MOD (err_ipc|err_sub(2)) | |
49 | ||
50 | #define SERV_NETNAME_MOD (err_server|err_sub(0)) | |
51 | #define SERV_ENV_MOD (err_server|err_sub(1)) | |
52 | #define SERV_EXECD_MOD (err_server|err_sub(2)) | |
53 | ||
54 | ||
55 | #define NO_SUCH_ERROR "unknown error code" | |
56 | ||
57 | struct error_subsystem { | |
58 | char * subsys_name; | |
59 | int max_code; | |
60 | char * * codes; | |
61 | }; | |
62 | ||
63 | struct error_system { | |
64 | int max_sub; | |
65 | char * bad_sub; | |
66 | struct error_subsystem * subsystem; | |
67 | }; | |
68 | ||
5b2abdfb A |
69 | __private_extern__ struct error_system _mach_errors[err_max_system+1]; |
70 | ||
71 | __private_extern__ char *mach_error_string_int(mach_error_t, boolean_t *); | |
e9ce8d39 A |
72 | |
73 | #define errlib_count(s) (sizeof(s)/sizeof(s[0])) |