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