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