]> git.saurik.com Git - apple/xnu.git/blobdiff - libsyscall/mach/err_iokit.sub
xnu-3247.1.106.tar.gz
[apple/xnu.git] / libsyscall / mach / err_iokit.sub
old mode 100755 (executable)
new mode 100644 (file)
index 2230ecc..b5361b8
  *     error codes for Mach and Unix kernels
  */
 
-#include <Kernel/IOKit/IOReturn.h>
+#include <TargetConditionals.h>
+#include <IOKit/IOReturn.h>
+#if !TARGET_OS_EMBEDDED
 #include <IOKit/usb/USB.h>
 #include <IOKit/firewire/IOFireWireLib.h>
+#endif
 
-static struct error_sparse_map err_codes_iokit_common_map[] = {
+static const struct error_sparse_map err_codes_iokit_common_map[] = {
     err_code_map_entry(kIOReturnInvalid, kIOReturnInvalid ),
     err_code_map_entry(kIOReturnError,   kIOReturnNotFound),
 };
 
-static const char * err_codes_iokit_common[] = {
+static const char * const err_codes_iokit_common[] = {
     "(iokit/common) invalid - should never be seen",                   // 0x001
 
     "(iokit/common) general error",                                    // 0x2bc
@@ -94,7 +97,8 @@ static const char * err_codes_iokit_common[] = {
     "(iokit/common) data was not found",                               // 0x2f0
 };
 
-static struct error_sparse_map err_codes_iokit_usb_map[] = {
+#if !TARGET_OS_EMBEDDED
+static const struct error_sparse_map err_codes_iokit_usb_map[] = {
     err_code_map_entry(kIOUSBCRCErr, kIOUSBDataToggleErr),
     err_code_map_entry(kIOUSBPIDCheckErr, kIOUSBWrongPIDErr),
     err_code_map_entry(kIOUSBReserved1Err, kIOUSBLinkErr),
@@ -104,7 +108,7 @@ static struct error_sparse_map err_codes_iokit_usb_map[] = {
 };
 
 // error codes with in 0xe0004000
-static const char * err_codes_iokit_usb[] = {
+static const char * const err_codes_iokit_usb[] = {
     "(iokit/usb) USB Controller Error: bad CRC received",              // 0x001
     "(iokit/usb) USB Controller Error:  bitstuffing",                  // 0x002
     "(iokit/usb) USB Controller Error: Bad data toggle",               // 0x003
@@ -140,14 +144,14 @@ static const char * err_codes_iokit_usb[] = {
     "(iokit/usb) pipe ref not recognized",                             // 0x061
 };
 
-static struct error_sparse_map err_codes_iokit_fw_map[] = {
+static const struct error_sparse_map err_codes_iokit_fw_map[] = {
     err_code_map_entry(kIOConfigNoEntry, kIOFireWireBusReset),
     err_code_map_entry(kIOFireWireBogusDCLProgram, kIOFireWireCompleting),
     err_code_map_entry(kIOFWMessageServiceIsRequestingClose, kIOFWMessageTopologyChanged),
 };
 
 // error codes with in 0xe0008000
-static const char * err_codes_iokit_fw[] = {
+static const char * const err_codes_iokit_fw[] = {
     "(iokit/firewire) can't find requested entry in config ROM",       // 001
     "(iokit/firewire) command pending (internal)",                     // 002
     "(iokit/firewire) DCL callback is final callback (internal)",      // 003
@@ -192,13 +196,14 @@ static const char * err_codes_iokit_fw[] = {
 };
 
 // error codes with in 0xe0020000
-static const char * err_codes_iokit_bluetooth[] = {
+static const char * const err_codes_iokit_bluetooth[] = {
     "(iokit/bluetooth) unknown error",                                 // 000
     "(iokit/bluetooth) interrupted operation, hardware reset",         // 001
     "(iokit/bluetooth) connection to device already exists",           // 002
     "(iokit/bluetooth) no HCI controller",                             // 003
     "(iokit/bluetooth) changing power states is unsupported",          // 004
 };
+#endif /* !TARGET_OS_EMBEDDED */
 
 static const struct error_sparse_map err_iokit_sub_map[] = {
     err_sub_map_entry(sub_iokit_common,          sub_iokit_pmu),
@@ -206,7 +211,7 @@ static const struct error_sparse_map err_iokit_sub_map[] = {
 };
 
 #define err_iokit_null_sub     { "(iokit/?", 0 }
-static struct error_subsystem err_iokit_sub[] =
+static const struct error_subsystem err_iokit_sub[] =
 {
     /* 0 */ {
        "(iokit/common)",                       // 0xe0000000
@@ -215,6 +220,7 @@ static struct error_subsystem err_iokit_sub[] =
        err_codes_iokit_common_map,
        errlib_count(err_codes_iokit_common_map),
     },
+#if !TARGET_OS_EMBEDDED
     /*  1 */ {
        "(iokit/usb)",                          // 0xe0004000
        errlib_count(err_codes_iokit_usb),
@@ -229,17 +235,20 @@ static struct error_subsystem err_iokit_sub[] =
        err_codes_iokit_fw_map,
        errlib_count(err_codes_iokit_fw_map),
     },
+#endif /* !TARGET_OS_EMBEDDED */
     /*  3 */ err_iokit_null_sub,               // 0xe000c000
     /*  4 */ { "(iokit/blkstorage)", 0 },      // 0xe0010000
     /*  5 */ { "(iokit/graphics)",   0 },      // 0xe0014000
     /*  6 */ err_iokit_null_sub,               // 0xe0018000
     /*  7 */ err_iokit_null_sub,               // 0xe001c000
+#if !TARGET_OS_EMBEDDED
     /*  8 */ {
        "(iokit/bluetooth)",                    // 0xe0020000
        errlib_count(err_codes_iokit_bluetooth),
        err_codes_iokit_bluetooth,
        NULL, 0,
     },
+#endif /* !TARGET_OS_EMBEDDED */
     /*  9 */ { "(iokit/pmu)",        0 },      // 0xe0024000
     /* -2 */ { "(iokit/vendor)",     0 },      // 0xe0028000
     /* -1 */ { "(iokit/reserved)",   0 },      // 0xe002c000