]>
Commit | Line | Data |
---|---|---|
b0d623f7 A |
1 | /* |
2 | * Copyright (c) 2008 Apple Inc. All rights reserved. | |
3 | * | |
4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | |
5 | * | |
6 | * The contents of this file constitute Original Code as defined in and | |
7 | * are subject to the Apple Public Source License Version 1.1 (the | |
8 | * "License"). You may not use this file except in compliance with the | |
9 | * License. Please obtain a copy of the License at | |
10 | * http://www.apple.com/publicsource and read it before using this file. | |
11 | * | |
12 | * This Original Code and all software distributed under the License are | |
13 | * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | |
15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
16 | * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the | |
17 | * License for the specific language governing rights and limitations | |
18 | * under the License. | |
19 | * | |
20 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | |
21 | */ | |
22 | ||
23 | /* | |
24 | * File: err_libkern.sub | |
25 | * Author: Nik Gervae, Apple Inc. | |
26 | * Date: October 2008 | |
27 | * | |
28 | * error codes for Libkern/C++ | |
29 | */ | |
30 | ||
31 | #include <libkern/OSReturn.h> | |
32 | #include <libkern/OSKextLib.h> | |
33 | ||
34 | ||
35 | /* These codes are specified in decimal in OSReturn.h. | |
36 | */ | |
6d2010ae | 37 | static const char * const err_codes_libkern_common[] = { |
b0d623f7 A |
38 | NO_SUCH_ERROR, |
39 | "(libkern/common) general/unspecified error", /* 1 */ | |
40 | }; | |
41 | ||
42 | /* These codes are specified in decimal in OSReturn.h. | |
43 | */ | |
6d2010ae | 44 | static const char * const err_codes_libkern_metaclass[] = { |
b0d623f7 A |
45 | NO_SUCH_ERROR, |
46 | "(libkern/metaclass) runtime internal error", /* 1 */ | |
47 | "(libkern/metaclass) class has instances", /* 2 */ | |
48 | "(libkern/metaclass) OSMetaClass::preModLoad() not called, runtime internal error", /* 3 */ | |
49 | "(libkern/metaclass) allocation failure, internal data", /* 4 */ | |
50 | "(libkern/metaclass) allocation failure, class tracking dictionaries", /* 5 */ | |
51 | "(libkern/metaclass) allocation failure, no kext/class set", /* 6 */ | |
52 | "(libkern/metaclass) failed to insert class into class dictionary", /* 7 */ | |
53 | "(libkern/metaclass) can't associate class with its superclass", /* 8 */ | |
54 | "(libkern/metaclass) can't find superclass during instance creation", /* 9 */ | |
55 | "(libkern/metaclass) duplicate class name encountered", /* 10 */ | |
56 | "(libkern/metaclass) no kext for metaclass", /* 11 */ | |
57 | }; | |
58 | ||
59 | /* These codes are specified in hexadecimal in OSKextLib.h. | |
60 | */ | |
6d2010ae | 61 | static const char * const err_codes_libkern_kext[] = { |
b0d623f7 A |
62 | NO_SUCH_ERROR, |
63 | "(libkern/kext) internal error", /* 0x1 */ | |
64 | "(libkern/kext) allocation failure", /* 0x2 */ | |
65 | "(libkern/kext) resource shortage", /* 0x3 */ | |
66 | "(libkern/kext) not privileged", /* 0x4 */ | |
67 | "(libkern/kext) invalid argument", /* 0x5 */ | |
68 | "(libkern/kext) not found", /* 0x6 */ | |
69 | "(libkern/kext) bad data (mkext/other)", /* 0x7 */ | |
70 | "(libkern/kext) XML (un)serialization error", /* 0x8 */ | |
71 | "(libkern/kext) function/version unsupported", /* 0x9 */ | |
72 | "(libkern/kext) function disabled", /* 0xa */ | |
73 | ||
74 | "(libkern/kext) malformed kext (bundle layout/missing plist)", /* 0xb */ | |
75 | "(libkern/kext) validation failure (plist/executable)", /* 0xc */ | |
76 | "(libkern/kext) authentication failure (file ownership/permissions)", /* 0xd */ | |
77 | "(libkern/kext) dependency resolution failure", /* 0xe */ | |
78 | "(libkern/kext) requested architecture/executable not found", /* 0xf */ | |
79 | "(libkern/kext) cache error", /* 0x10 */ | |
80 | ||
81 | "(libkern/kext) operation deferred (queued to user space)", /* 0x11 */ | |
82 | "(libkern/kext) operation/kext not allowed at current boot level", /* 0x12 */ | |
83 | "(libkern/kext) not loadable (reason unspecified)", /* 0x13 */ | |
84 | "(libkern/kext) different version/uuid already loaded", /* 0x14 */ | |
85 | ||
86 | "(libkern/kext) dependency load failed", /* 0x15 */ | |
87 | "(libkern/kext) link error", /* 0x16 */ | |
88 | "(libkern/kext) kext (kmod) start/stop routine failed", /* 0x17 */ | |
89 | "(libkern/kext) kext is in use or retained (cannot unload)", /* 0x18 */ | |
90 | "(libkern/kext) kext request timed out", /* 0x19 */ | |
91 | "(libkern/kext) kext is stopping and cannot issue requests", /* 0x1a */ | |
5ba3f43e | 92 | "(libkern/kext) system policy prevents loading", /* 0x1b */ |
f427ee49 A |
93 | |
94 | "(libkern/kext) loading/mapping of a kext collection failed", /* 0x1c */ | |
95 | "(libkern/kext) mapping of the SystemKC failed", /* 0x1d */ | |
96 | "(libkern/kext) loading/mapping of the AuxiliaryKC failed", /* 0x1e */ | |
97 | "(libkern/kext) loading of both Auxiliary and System KCs failed", /* 0x1f */ | |
b0d623f7 A |
98 | }; |
99 | ||
100 | /* libkern is err_system(0x37) */ | |
101 | static const struct error_subsystem err_libkern_sub[] = { | |
102 | /* subsystem 0 */ | |
103 | { | |
104 | "(libkern/common)", | |
105 | errlib_count(err_codes_libkern_common), | |
106 | err_codes_libkern_common, | |
107 | }, | |
108 | ||
109 | /* subsystem 1 */ | |
110 | { | |
111 | "(libkern/metaclass)", | |
112 | errlib_count(err_codes_libkern_metaclass), | |
113 | err_codes_libkern_metaclass, | |
114 | }, | |
115 | ||
116 | /* subsystem 2 */ | |
117 | { | |
118 | "(libkern/kext)", | |
119 | errlib_count(err_codes_libkern_kext), | |
120 | err_codes_libkern_kext, | |
121 | }, | |
122 | }; | |
f427ee49 A |
123 | |
124 | ||
125 | /* vim: set ft=c ts=8 sw=4: */ |