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