X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/b0d623f7f2ae71ed96e60569f61f9a9a27016e80..c6bf4f310a33a9262d455ea4d3f0630b1255e3fe:/libsyscall/mach/err_iokit.sub diff --git a/libsyscall/mach/err_iokit.sub b/libsyscall/mach/err_iokit.sub old mode 100755 new mode 100644 index 02e657aa8..7a105843b --- a/libsyscall/mach/err_iokit.sub +++ b/libsyscall/mach/err_iokit.sub @@ -29,17 +29,17 @@ #include #include -#if !TARGET_OS_EMBEDDED +#if !(TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR) #include #include #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 @@ -97,8 +97,8 @@ static const char * err_codes_iokit_common[] = { "(iokit/common) data was not found", // 0x2f0 }; -#if !TARGET_OS_EMBEDDED -static struct error_sparse_map err_codes_iokit_usb_map[] = { +#if !(TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR) +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), @@ -108,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 @@ -144,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 @@ -196,14 +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 */ +#endif /* !(TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR) */ static const struct error_sparse_map err_iokit_sub_map[] = { err_sub_map_entry(sub_iokit_common, sub_iokit_pmu), @@ -211,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 @@ -220,7 +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 +#if !(TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR) /* 1 */ { "(iokit/usb)", // 0xe0004000 errlib_count(err_codes_iokit_usb), @@ -235,20 +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 */ +#endif /* !(TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR) */ /* 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 +#if !(TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR) /* 8 */ { "(iokit/bluetooth)", // 0xe0020000 errlib_count(err_codes_iokit_bluetooth), err_codes_iokit_bluetooth, NULL, 0, }, -#endif /* !TARGET_OS_EMBEDDED */ +#endif /* !(TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR) */ /* 9 */ { "(iokit/pmu)", 0 }, // 0xe0024000 /* -2 */ { "(iokit/vendor)", 0 }, // 0xe0028000 /* -1 */ { "(iokit/reserved)", 0 }, // 0xe002c000