]>
Commit | Line | Data |
---|---|---|
1c79356b | 1 | /* |
55e303ae | 2 | * Copyright (c) 1998-2002 Apple Computer, Inc. All rights reserved. |
1c79356b A |
3 | * |
4 | * @APPLE_LICENSE_HEADER_START@ | |
5 | * | |
43866e37 | 6 | * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. |
1c79356b | 7 | * |
43866e37 A |
8 | * This file contains Original Code and/or Modifications of Original Code |
9 | * as defined in and that are subject to the Apple Public Source License | |
10 | * Version 2.0 (the 'License'). You may not use this file except in | |
11 | * compliance with the License. Please obtain a copy of the License at | |
12 | * http://www.opensource.apple.com/apsl/ and read it before using this | |
13 | * file. | |
14 | * | |
15 | * The Original Code and all software distributed under the License are | |
16 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
1c79356b A |
17 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, |
18 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
43866e37 A |
19 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. |
20 | * Please see the License for the specific language governing rights and | |
21 | * limitations under the License. | |
1c79356b A |
22 | * |
23 | * @APPLE_LICENSE_HEADER_END@ | |
24 | */ | |
25 | /* | |
1c79356b | 26 | * HISTORY |
1c79356b A |
27 | */ |
28 | ||
29 | /* | |
30 | * Core IOReturn values. Others may be family defined. | |
31 | */ | |
32 | ||
33 | #ifndef __IOKIT_IORETURN_H | |
34 | #define __IOKIT_IORETURN_H | |
35 | ||
36 | #ifdef __cplusplus | |
37 | extern "C" { | |
38 | #endif | |
39 | ||
40 | #include <mach/error.h> | |
41 | ||
42 | typedef kern_return_t IOReturn; | |
43 | ||
44 | #ifndef sys_iokit | |
45 | #define sys_iokit err_system(0x38) | |
46 | #endif /* sys_iokit */ | |
47 | #define sub_iokit_common err_sub(0) | |
48 | #define sub_iokit_usb err_sub(1) | |
49 | #define sub_iokit_firewire err_sub(2) | |
50 | #define sub_iokit_block_storage err_sub(4) | |
55e303ae A |
51 | #define sub_iokit_graphics err_sub(5) |
52 | #define sub_iokit_bluetooth err_sub(8) | |
53 | #define sub_iokit_pmu err_sub(9) | |
1c79356b A |
54 | #define sub_iokit_reserved err_sub(-1) |
55 | #define iokit_common_err(return) (sys_iokit|sub_iokit_common|return) | |
56 | #define iokit_family_err(sub,return) (sys_iokit|sub|return) | |
57 | ||
58 | #define kIOReturnSuccess KERN_SUCCESS // OK | |
59 | #define kIOReturnError iokit_common_err(0x2bc) // general error | |
60 | #define kIOReturnNoMemory iokit_common_err(0x2bd) // can't allocate memory | |
61 | #define kIOReturnNoResources iokit_common_err(0x2be) // resource shortage | |
62 | #define kIOReturnIPCError iokit_common_err(0x2bf) // error during IPC | |
63 | #define kIOReturnNoDevice iokit_common_err(0x2c0) // no such device | |
64 | #define kIOReturnNotPrivileged iokit_common_err(0x2c1) // privilege violation | |
65 | #define kIOReturnBadArgument iokit_common_err(0x2c2) // invalid argument | |
66 | #define kIOReturnLockedRead iokit_common_err(0x2c3) // device read locked | |
67 | #define kIOReturnLockedWrite iokit_common_err(0x2c4) // device write locked | |
68 | #define kIOReturnExclusiveAccess iokit_common_err(0x2c5) // exclusive access and | |
69 | // device already open | |
70 | #define kIOReturnBadMessageID iokit_common_err(0x2c6) // sent/received messages | |
71 | // had different msg_id | |
72 | #define kIOReturnUnsupported iokit_common_err(0x2c7) // unsupported function | |
73 | #define kIOReturnVMError iokit_common_err(0x2c8) // misc. VM failure | |
74 | #define kIOReturnInternalError iokit_common_err(0x2c9) // internal error | |
75 | #define kIOReturnIOError iokit_common_err(0x2ca) // General I/O error | |
76 | //#define kIOReturn???Error iokit_common_err(0x2cb) // ??? | |
77 | #define kIOReturnCannotLock iokit_common_err(0x2cc) // can't acquire lock | |
78 | #define kIOReturnNotOpen iokit_common_err(0x2cd) // device not open | |
79 | #define kIOReturnNotReadable iokit_common_err(0x2ce) // read not supported | |
80 | #define kIOReturnNotWritable iokit_common_err(0x2cf) // write not supported | |
81 | #define kIOReturnNotAligned iokit_common_err(0x2d0) // alignment error | |
82 | #define kIOReturnBadMedia iokit_common_err(0x2d1) // Media Error | |
83 | #define kIOReturnStillOpen iokit_common_err(0x2d2) // device(s) still open | |
84 | #define kIOReturnRLDError iokit_common_err(0x2d3) // rld failure | |
85 | #define kIOReturnDMAError iokit_common_err(0x2d4) // DMA failure | |
86 | #define kIOReturnBusy iokit_common_err(0x2d5) // Device Busy | |
87 | #define kIOReturnTimeout iokit_common_err(0x2d6) // I/O Timeout | |
88 | #define kIOReturnOffline iokit_common_err(0x2d7) // device offline | |
89 | #define kIOReturnNotReady iokit_common_err(0x2d8) // not ready | |
90 | #define kIOReturnNotAttached iokit_common_err(0x2d9) // device not attached | |
91 | #define kIOReturnNoChannels iokit_common_err(0x2da) // no DMA channels left | |
92 | #define kIOReturnNoSpace iokit_common_err(0x2db) // no space for data | |
93 | //#define kIOReturn???Error iokit_common_err(0x2dc) // ??? | |
94 | #define kIOReturnPortExists iokit_common_err(0x2dd) // port already exists | |
95 | #define kIOReturnCannotWire iokit_common_err(0x2de) // can't wire down | |
96 | // physical memory | |
97 | #define kIOReturnNoInterrupt iokit_common_err(0x2df) // no interrupt attached | |
98 | #define kIOReturnNoFrames iokit_common_err(0x2e0) // no DMA frames enqueued | |
99 | #define kIOReturnMessageTooLarge iokit_common_err(0x2e1) // oversized msg received | |
100 | // on interrupt port | |
101 | #define kIOReturnNotPermitted iokit_common_err(0x2e2) // not permitted | |
102 | #define kIOReturnNoPower iokit_common_err(0x2e3) // no power to device | |
103 | #define kIOReturnNoMedia iokit_common_err(0x2e4) // media not present | |
104 | #define kIOReturnUnformattedMedia iokit_common_err(0x2e5)// media not formatted | |
105 | #define kIOReturnUnsupportedMode iokit_common_err(0x2e6) // no such mode | |
106 | #define kIOReturnUnderrun iokit_common_err(0x2e7) // data underrun | |
107 | #define kIOReturnOverrun iokit_common_err(0x2e8) // data overrun | |
108 | #define kIOReturnDeviceError iokit_common_err(0x2e9) // the device is not working properly! | |
109 | #define kIOReturnNoCompletion iokit_common_err(0x2ea) // a completion routine is required | |
110 | #define kIOReturnAborted iokit_common_err(0x2eb) // operation aborted | |
111 | #define kIOReturnNoBandwidth iokit_common_err(0x2ec) // bus bandwidth would be exceeded | |
112 | #define kIOReturnNotResponding iokit_common_err(0x2ed) // device not responding | |
113 | #define kIOReturnIsoTooOld iokit_common_err(0x2ee) // isochronous I/O request for distant past! | |
114 | #define kIOReturnIsoTooNew iokit_common_err(0x2ef) // isochronous I/O request for distant future | |
115 | #define kIOReturnNotFound iokit_common_err(0x2f0) // data was not found | |
116 | #define kIOReturnInvalid iokit_common_err(0x1) // should never be seen | |
117 | ||
118 | #ifdef __cplusplus | |
119 | } | |
120 | #endif | |
121 | ||
122 | #endif /* ! __IOKIT_IORETURN_H */ |