]>
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 "AS IS" | |
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 Mellon | |
24 | * the rights to redistribute these changes. | |
25 | */ | |
26 | ||
27 | /* This file was broken out from: | |
28 | $Log$ | |
29 | Revision 1.1 1993/11/30 17:35:24 roland | |
30 | entered into RCS | |
31 | ||
32 | Revision 2.3 92/04/01 19:38:18 rpd | |
33 | The static do_compat function is renamed to be globally accessible. | |
34 | */ | |
35 | ||
36 | #include <mach/error.h> | |
37 | #include <mach_error.h> | |
38 | #include <errorlib.h> | |
39 | ||
40 | ||
41 | void | |
42 | __mach_error_map_compat( org_err ) | |
43 | mach_error_t * org_err; | |
44 | { | |
45 | mach_error_t err = *org_err; | |
46 | ||
47 | /* | |
48 | * map old error numbers to | |
49 | * to new error sys & subsystem | |
50 | */ | |
51 | ||
52 | if ((-200 < err) && (err <= -100)) | |
53 | err = -(err + 100) | IPC_SEND_MOD; | |
54 | else if ((-300 < err) && (err <= -200)) | |
55 | err = -(err + 200) | IPC_RCV_MOD; | |
56 | else if ((-400 < err) && (err <= -300)) | |
57 | err = -(err + 300) | MACH_IPC_MIG_MOD; | |
58 | else if ((1000 <= err) && (err < 1100)) | |
59 | err = (err - 1000) | SERV_NETNAME_MOD; | |
60 | else if ((1600 <= err) && (err < 1700)) | |
61 | err = (err - 1600) | SERV_ENV_MOD; | |
62 | else if ((27600 <= err) && (err < 27700)) | |
63 | err = (err - 27600) | SERV_EXECD_MOD; | |
64 | else if ((2500 <= err) && (err < 2600)) | |
65 | err = (err - 2500) | KERN_DEVICE_MOD; | |
66 | else if ((5000 <= err) && (err < 5100)) | |
67 | err = (err - 5000) | BOOTSTRAP_FS_MOD; | |
68 | ||
69 | *org_err = err; | |
70 | } |