2 * Copyright (c) 2008 Apple Inc. All rights reserved.
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
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.
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
20 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
24 * File: err_libkern.sub
25 * Author: Nik Gervae, Apple Inc.
28 * error codes for Libkern/C++
31 #include <libkern/OSReturn.h>
32 #include <libkern/OSKextLib.h>
35 /* These codes are specified in decimal in OSReturn.h.
37 static const char * const err_codes_libkern_common[] = {
39 "(libkern/common) general/unspecified error", /* 1 */
42 /* These codes are specified in decimal in OSReturn.h.
44 static const char * const err_codes_libkern_metaclass[] = {
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 */
59 /* These codes are specified in hexadecimal in OSKextLib.h.
61 static const char * const err_codes_libkern_kext[] = {
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 */
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 */
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 */
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 */
92 "(libkern/kext) system policy prevents loading", /* 0x1b */
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 */
100 /* libkern is err_system(0x37) */
101 static const struct error_subsystem err_libkern_sub[] = {
105 errlib_count(err_codes_libkern_common),
106 err_codes_libkern_common,
111 "(libkern/metaclass)",
112 errlib_count(err_codes_libkern_metaclass),
113 err_codes_libkern_metaclass,
119 errlib_count(err_codes_libkern_kext),
120 err_codes_libkern_kext,
125 /* vim: set ft=c ts=8 sw=4: */