#ifndef IORETURN_H
#define IORETURN_H

#include <mach/error.h>
//#include <HYS/IOKit/IOReturnh>
#ifdef __cplusplus
extern "C" {
#endif

/*sys_iokit

Value: 0xe0000000 (-536870912)
#define sys_iokit  
Discussion 

The sys_iokit macro is defined as sys_iokit err_system(0x38)*/
#define sys_iokit  err_system(0x38)

/*sub_iokit_common

#define sub_iokit_common err_sub(0) 
Discussion 

The sub_iokit_common macro is defined as sub_iokit_common err_sub(0)*/
#define sub_iokit_common err_sub(0)

/*IOReturn

typedef kern_return_t IOReturn;  
Discussion 

IOReturn is the return type used for most I/O Kit functions that can return an error 
#defines*/
typedef kern_return_t IOReturn;  

/*iokit_common_err

#define iokit_common_err(return)  
Discussion 

The iokit_common_err macro is defined as iokit_common_err(return) (sys_iokit|sub_iokit_common|return) */
#define iokit_common_err(return)  (sys_iokit|sub_iokit_common|return)

/*iokit_family_err

#define iokit_family_err(sub,return)  
Discussion 

The iokit_family_err macro is defined as iokit_family_err(sub,return) (sys_iokit|sub|return) */
#define iokit_family_err(sub,return)  (sys_iokit|sub|return)

/*iokit_vendor_specific_err

#define iokit_vendor_specific_err(return)  
Discussion 

The iokit_vendor_specific_err macro is defined as iokit_vendor_specific_err(return) (sys_iokit|sub_iokit_vendor_specific|return) */
#define iokit_vendor_specific_err(return)  (sys_iokit|sub_iokit_vendor_specific|return)

/*kIOReturnAborted


The operation has been aborted (0xe00002eb)
Value: 0xe00002eb (-536870165)
#define kIOReturnAborted   */
#define kIOReturnAborted   iokit_common_err(0xe00002eb )

/*kIOReturnBadArgument


There is an invalid argument (0xe00002c2)
Value: 0xe00002c2 (-536870206)
#define kIOReturnBadArgument  */ 
#define kIOReturnBadArgument  iokit_common_err(0xe00002c2 )

/*kIOReturnBadMedia


There has been a media error (0xe00002d1)
Value: 0xe00002d1 (-536870191)
#define kIOReturnBadMedia   */
#define kIOReturnBadMedia iokit_common_err(0xe00002d1)

/*kIOReturnBadMessageID


The sent or received message had a different message id (0xe00002c6)
Value: 0xe00002c6 (-536870202)
#define kIOReturnBadMessageID   */
#define kIOReturnBadMessageID  iokit_common_err(0xe00002c6)

/*kIOReturnBusy


The device is busy (0xe00002d5)
Value: 0xe00002d5 (-536870187)
#define kIOReturnBusy   */
#define kIOReturnBusy iokit_common_err(0xe00002d5)

/*kIOReturnCannotLock


The lock cannot be acquired (0xe00002cc)
Value: 0xe00002cc (-536870196)
#define kIOReturnCannotLock   */
#define kIOReturnCannotLock iokit_common_err(0xe00002cc )

/*kIOReturnCannotWire


Physical memory can't be wired down (0xe00002de)
Value: 0xe00002de (-536870178)
#define kIOReturnCannotWire   */
#define kIOReturnCannotWire iokit_common_err(0xe00002de)

/*kIOReturnDeviceError


There has been a device error (0xe00002e9)
Value: 0xe00002e9 (-536870167)
#define kIOReturnDeviceError   */
#define kIOReturnDeviceError iokit_common_err(0xe00002e9) 


/*kIOReturnDMAError


There has been a DMA failure (0xe00002d4)
Value: 0xe00002d4 (-536870188)
#define kIOReturnDMAError   */
#define kIOReturnDMAError   iokit_common_err(0xe00002d4 ) 


/*kIOReturnError

A general error (0xe00002bc)
Value: 0xe00002bc (-536870212)
#define kIOReturnError   */
#define kIOReturnError  iokit_common_err(0xe00002bc)

/*kIOReturnExclusiveAccess


The device is already open with exclusive access (0xe00002c5)
Value: 0xe00002c5 (-536870203)
#define kIOReturnExclusiveAccess   */
#define kIOReturnExclusiveAccess  iokit_common_err(0xe00002c5) 

/*kIOReturnInternalError


There has been an internal error (0xe00002c9)
Value: 0xe00002c9 (-536870199)
#define kIOReturnInternalError   */
#define kIOReturnInternalError   iokit_common_err(0xe00002c9 ) 
/*kIOReturnInvalid


The is an invalid error (should never be seen) (0xe0000001)
Value: 0xe0000001 (-536870911)
#define kIOReturnInvalid   */
#define kIOReturnInvalid iokit_common_err(0xe0000001 ) 

/*kIOReturnIOError


There has been a general I/O error (0xe00002ca)
Value: 0xe00002ca (-536870198)
#define kIOReturnIOError   */
#define kIOReturnIOError iokit_common_err(0xe00002ca ) 

/*kIOReturnIPCError


There has been an error during IPC (inter-process communication) (0xe00002bf)
Value: 0xe00002bf (-536870209)
#define kIOReturnIPCError   */
#define kIOReturnIPCError  iokit_common_err(0xe00002bf ) 

/*kIOReturnIsoTooNew


The isochronous I/O request is too early (0xe00002ef)
Value: 0xe00002ef (-536870161)
#define kIOReturnIsoTooNew   */
#define kIOReturnIsoTooNew iokit_common_err(0xe00002ef ) 

/*kIOReturnIsoTooOld


The isochronous I/O request is too old (0xe00002ee)
Value: 0xe00002ee (-536870162)
#define kIOReturnIsoTooOld   */
#define kIOReturnIsoTooOld  iokit_common_err(0xe00002ee ) 

/*kIOReturnLockedRead


The device is read locked (0xe00002c3)
Value: 0xe00002c3 (-536870205)
#define kIOReturnLockedRead   */
#define kIOReturnLockedRead iokit_common_err(0xe00002c3 ) 

/*kIOReturnLockedWrite


The device is write locked (0xe00002c4)
Value: 0xe00002c4 (-536870204)
#define kIOReturnLockedWrite   */
#define kIOReturnLockedWrite  iokit_common_err(0xe00002c4 ) 

/*kIOReturnMessageTooLarge


An oversized message has been received on an interrupt port (0xe00002e1)
Value: 0xe00002e1 (-536870175)
#define kIOReturnMessageTooLarge   */
#define kIOReturnMessageTooLarg iokit_common_err(0xe00002e1) 

/*kIOReturnNoBandwidth


The operation will cause bus bandwidth to be exceeded (0xe00002ec)
Value: 0xe00002ec (-536870164)
#define kIOReturnNoBandwidth   */
#define kIOReturnNoBandwidth  iokit_common_err(0xe00002ec ) 

/*kIOReturnNoChannels


There are no DMA channels left (0xe00002da)
Value: 0xe00002da (-536870182)
#define kIOReturnNoChannels   */
#define kIOReturnNoChannels iokit_common_err(0xe00002da) 

/*kIOReturnNoCompletion


A completion routine is required (0xe00002ea)
Value: 0xe00002ea (-536870166)
#define kIOReturnNoCompletion   */
#define kIOReturnNoCompletion iokit_common_err(0xe00002ea ) 

/*kIOReturnNoDevice


There is no such device (0xe00002c0)
Value: 0xe00002c0 (-536870208)
#define kIOReturnNoDevice   */
#define kIOReturnNoDevice iokit_common_err(0xe00002c0 ) 

/*kIOReturnNoFrames


There are no DMA frames enqueued (0xe00002e0)
Value: 0xe00002e0 (-536870176)
#define kIOReturnNoFrames   */
#define kIOReturnNoFrames iokit_common_err(0xe00002e0 ) 

/*kIOReturnNoInterrupt


There is no interrupt attached (0xe00002df)
Value: 0xe00002df (-536870177)
#define kIOReturnNoInterrupt   */
#define kIOReturnNoInterrupt iokit_common_err(0xe00002df ) 

/*kIOReturnNoMedia


No media is present (0xe00002e4)
Value: 0xe00002e4 (-536870172)
#define kIOReturnNoMedia   */
#define kIOReturnNoMedia iokit_common_err(0xe00002e4 ) 

/*kIOReturnNoMemory


Memory can't be allocated (0xe00002bd)
Value: 0xe00002bd (-536870211)
#define kIOReturnNoMemory   */
#define kIOReturnNoMemory iokit_common_err(0xe00002bd ) 

/*kIOReturnNoPower


There is no power to the device (0xe00002e3)
Value: 0xe00002e3 (-536870173)
#define kIOReturnNoPower   */
#define kIOReturnNoPower iokit_common_err(0xe00002e3 ) 

/*kIOReturnNoResources


There is a resource shortage (0xe00002be)
Value: 0xe00002be (-536870210)
#define kIOReturnNoResources   */
#define kIOReturnNoResources iokit_common_err(0xe00002be ) 

/*kIOReturnNoSpace


There is no space for data (0xe00002db)
Value: 0xe00002db (-536870181)
#define kIOReturnNoSpace   */
#define kIOReturnNoSpace  iokit_common_err( 0xe00002db) 

/*kIOReturnNotAligned


There has been an alignment error (0xe00002d0)
Value: 0xe00002d0 (-536870192)
#define kIOReturnNotAligned   */
#define kIOReturnNotAligned iokit_common_err(0xe00002d0 ) 

/*kIOReturnNotAttached


The device is not attached (0xe00002d9)
Value: 0xe00002d9 (-536870183)
#define kIOReturnNotAttached   */
#define kIOReturnNotAttached iokit_common_err(0x2d9)

/*kIOReturnNotFound


The data was not found (0xe00002f0)
Value: 0xe00002f0 (-536870160)
#define kIOReturnNotFound   */
#define kIOReturnNotFound   iokit_common_err(0xe00002f0 ) 
/*kIOReturnNotOpen


The device is not open (0xe00002cd)
Value: 0xe00002cd (-536870195)
#define kIOReturnNotOpen   */
#define kIOReturnNotOpen iokit_common_err(0xe00002cd ) 

/*kIOReturnNotPermitted


The operation is not permitted (0xe00002e2)
Value: 0xe00002e2 (-536870174)
#define kIOReturnNotPermitted   */
#define kIOReturnNotPermitted  iokit_common_err(0xe00002e2 ) 

/*kIOReturnNotPrivileged


There has been a privilege violation (0xe00002c1)
Value: 0xe00002c1 (-536870207)
#define kIOReturnNotPrivileged   */
#define kIOReturnNotPrivileged iokit_common_err(0xe00002c1) 
/*kIOReturnNotReadable


Read is not supported (0xe00002ce)
Value: 0xe00002ce (-536870194)
#define kIOReturnNotReadable   */
#define kIOReturnNotReadable  iokit_common_err(0xe00002ce ) 

/*kIOReturnNotReady


The device is not ready (0xe00002d8)
Value: 0xe00002d8 (-536870184)
#define kIOReturnNotReady   */
#define kIOReturnNotReady iokit_common_err(0xe00002d8 ) 

/*kIOReturnNotResponding


The device is not responding (0xe00002ed)
Value: 0xe00002ed (-536870163)
#define kIOReturnNotResponding   */
#define kIOReturnNotResponding  iokit_common_err(0xe00002ed ) 

/*kIOReturnNotWritable


Write is not supported (0xe00002cf)
Value: 0xe00002cf (-536870193)
#define kIOReturnNotWritable   */
#define kIOReturnNotWritable iokit_common_err(0xe00002cf ) 

/*kIOReturnOffline


The device is offline (0xe00002d7)
Value: 0xe00002d7 (-536870185)
#define kIOReturnOffline   */
#define kIOReturnOffline iokit_common_err(0xe00002d7 ) 

/*kIOReturnOverrun


There has been a data overrun (0xe00002e8)
Value: 0xe00002e8 (-536870168)
#define kIOReturnOverrun   */
#define kIOReturnOverrun iokit_common_err(0xe00002e8 ) 

/*kIOReturnPortExists


The port already exists (0xe00002dd)
Value: 0xe00002dd (-536870179)
#define kIOReturnPortExists   */
#define kIOReturnPortExists iokit_common_err(0xe00002dd ) 

/*kIOReturnRLDError


There has been an RLD failure (0xe00002d3)
Value: 0xe00002d3 (-536870189)
#define kIOReturnRLDError   */
#define kIOReturnRLDError  iokit_common_err(0xe00002d3) 

/*kIOReturnStillOpen


The device is still open (0xe00002d2)
Value: 0xe00002d2 (-536870190)
#define kIOReturnStillOpen   */
#define kIOReturnStillOpen iokit_common_err(0xe00002d2 ) 

/*kIOReturnSuccess


Success
#define kIOReturnSuccess KERN_SUCCESS // OK  */
#define kIOReturnSuccess KERN_SUCCESS // OK  

/*kIOReturnTimeout


The I/O has timed out (0xe00002d6)
Value: 0xe00002d6 (-536870186)
#define kIOReturnTimeout   */
#define kIOReturnTimeout  iokit_common_err(0xe00002d6 ) 

/*kIOReturnUnderrun


There has been a data underrun (0xe00002e7)
Value: 0xe00002e7 (-536870169)
#define kIOReturnUnderrun   */
#define kIOReturnUnderrun iokit_common_err(0xe00002e7 ) 

/*kIOReturnUnformattedMedia


The media is not formatted (0xe00002e5)
Value: 0xe00002e5 (-536870171)
#define kIOReturnUnformattedMedia   */
#define kIOReturnUnformattedMedia iokit_common_err(0xe00002e5 ) 

/*kIOReturnUnsupported


This is an unsupported function (0xe00002c7)
Value: 0xe00002c7 (-536870201)
#define kIOReturnUnsupported   */
#define kIOReturnUnsupported iokit_common_err(0xe00002c7 ) 

/*kIOReturnUnsupportedMode


There is no such mode (0xe00002e6)
Value: 0xe00002e6 (-536870170)
#define kIOReturnUnsupportedMode   */
#define kIOReturnUnsupportedMode   iokit_common_err(0xe00002e6 ) 

/*kIOReturnVMError


There is some sort of VM (virtual memory) failure (0xe00002c8)
Value: 0xe00002c8 (-536870200)
#define kIOReturnVMError   */
#define kIOReturnVMError   iokit_common_err(0xe00002c8) 

/*sub_iokit_block_storage

Value: 0x10000 (65536)
#define sub_iokit_block_storage  */
#define sub_iokit_block_storage iokit_common_err(0x10000 ) 



#ifdef __cplusplus
}
#endif

#endif