thanks, but it's not totally clear to me how you would do this...
Well, how are you getting the drive objects in the first place? Do you use IOServiceGetMatchingServices() or IOServiceAddMatchingNotification()?
In either case, the matching dictionary is just:
IOServiceMatching ( "IOAHCIBlockStorageDevice" );
You might have to register for two notifications or query for two types of devices. If your code can run on later releases only, you can simply look for the "SMART Capable" property in the node:
// Create the dictionaries
matchingDict = CFDictionaryCreateMutable ( kCFAllocatorDefault,
0,
&kCFTypeDictionaryKeyCallBacks,
&kCFTypeDictionaryValueCallBacks );
subDict = CFDictionaryCreateMutable ( kCFAllocatorDefault,
0,
&kCFTypeDictionaryKeyCallBacks,
&kCFTypeDictionaryValueCallBacks );
//
// Note: We are setting up a matching dictionary which looks like the following:
//
// <dict>
// <key>IOPropertyMatch</key>
// <dict>
// <key>SMART Capable</key>
// <true/>
// </dict>
// </dict>
//
// Create a dictionary with the "SMART Capable" key = true
CFDictionarySetValue ( subDict,
CFSTR ( kIOPropertySMARTCapableKey ),
kCFBooleanTrue );
// Add the dictionary to the main dictionary with the key "IOPropertyMatch" to
// narrow the search to the above dictionary.
CFDictionarySetValue ( matchingDict,
CFSTR ( kIOPropertyMatchKey ),
subDict );
CFRelease ( subDict );
subDict = NULL;
error = IOServiceGetMatchingServices ( kIOMasterPortDefault,
matchingDict,
&iter );
That should be enough to get you going...
-- Chris