|
Mac Dev Center
Mac OS X Reference Library Drivers, Kernel, & Hardware: User-Space Device Access I/O Kit Framework Reference
|
ATASMARTLib.h |
| Includes: |
<IOKit/IOReturn.h> <IOKit/IOTypes.h> <CoreFoundation/CFPlugIn.h> <CoreFoundation/CFPlugInCOM.h> <IOKit/IOCFPlugIn.h> <IOKit/storage/ata/IOATAStorageDefines.h> |
Use the links in the table of contents to the left to access the documentation.
Reads the 512-byte data provided by the drive in response to the ATA IDENTIFY DEVICE command.
GetATAIdentifyData |
Reads the 512-byte data provided by the drive in response to the ATA IDENTIFY DEVICE command.
typedef struct IOATASMARTInterface { IUNKNOWN_C_GUTS; UInt16 version; UInt16 revision; /* * MANDATORY API support. If the device claims SMART feature set compliance, it * must implement the following functions. */ IOReturn ( *SMARTEnableDisableOperations ) ( void * interface, Boolean enable ); IOReturn ( *SMARTEnableDisableAutosave ) ( void * interface, Boolean enable ); IOReturn ( *SMARTReturnStatus ) ( void * interface, Boolean * exceededCondition ); /* * OPTIONAL API support. If the device claims SMART feature set compliance, it * may implement one or more of the following functions. Please consult the * technical manual for the device to see what functions are supported. */ IOReturn ( *SMARTExecuteOffLineImmediate ) ( void * interface, Boolean extendedTest ); IOReturn ( *SMARTReadData ) ( void * interface, ATASMARTData * data ); IOReturn ( *SMARTValidateReadData ) ( void * interface, const ATASMARTData * data ); IOReturn ( *SMARTReadDataThresholds ) ( void * interface, ATASMARTDataThresholds * dataThresholds ); IOReturn ( *SMARTReadLogDirectory ) ( void * interface, ATASMARTLogDirectory * logData ); IOReturn ( *SMARTReadLogAtAddress ) ( void * interface, UInt32 logOffset, void * buffer, UInt32 size ); IOReturn ( *SMARTWriteLogAtAddress ) ( void * interface, UInt32 logOffset, const void * buffer, UInt32 size ); IOReturn ( *GetATAIdentifyData ) ( void * interface, void * buffer, UInt32 inSize, UInt32 * outSize ); } IOATASMARTInterface;
enablePassing true will ENABLE SMART operations, false will DISABLE SMART operations.
enablePassing true will ENABLE SMART Autosave, false will DISABLE SMART Autosave.
ifexceededCondition is non-zero the device threshold exceeded condition.
passingtrue will collect "off-line" extended test, false short test.
interfaceA valid IOATASMARTInterface**.
bufferA valid buffer.
inSizeThe number of bytes to place in the buffer.
outSizeThe number of bytes placed in the buffer. Can be NULL if the information is not required by the caller.
An IOReturn result code. If inSize is greater than 512 or less than 1, kIOReturnBadArgument is returned.
Reads the 512-byte data provided by the drive in response to the ATA IDENTIFY DEVICE command. See section 8.15 of ATA/ATAPI-6. The data placed in buffer is guaranteed to be in native endian form on return. (i.e. it will be byte swapped on big endian platforms, so the caller need not do anything)
kIOATASMARTInterfaceID |
#define kIOATASMARTInterfaceID CFUUIDGetConstantUUIDWithBytes(NULL, \ 0x08, 0xAB, 0xE2, 0x1C, 0x20, 0xD4, 0x11, 0xD6, \ 0x8D, 0xF6, 0x00, 0x03, 0x93, 0x5A, 0x76, 0xB2)
InterfaceID for IOATASMARTInterface.
kIOATASMARTLibFactoryID |
#define kIOATASMARTLibFactoryID CFUUIDGetConstantUUIDWithBytes(NULL, \ 0x5E, 0x65, 0x9F, 0x92, 0x20, 0xD3, 0x11, 0xD6, \ 0xBD, 0xB5, 0x00, 0x03, 0x93, 0x5A, 0x76, 0xB2)
UUID for the IOATASMARTInterface Factory.
kIOATASMARTUserClientTypeID |
#define kIOATASMARTUserClientTypeID CFUUIDGetConstantUUIDWithBytes(NULL, \ 0x24, 0x51, 0x4B, 0x7A, 0x28, 0x04, 0x11, 0xD6, \ 0x8A, 0x02, 0x00, 0x30, 0x65, 0x70, 0x48, 0x66)
Factory ID for creating an ATA SMART user client.
kIOPropertySMARTCapableKey |
#define kIOPropertySMARTCapableKey "SMART Capable"
Property to search for in IORegistry to find SMART capable devices without hardcoding the search to a particular device class.
Last Updated: 2009-10-15