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