How to get 'IOPlatformUUID' on OS X 10.4?

Joined
Mar 29, 2011
Messages
7
Reaction score
0
Points
1
I need to get UUID value on 10.4 but the command seems not to be supported here.

ioreg -rd1 -c IOPlatformExpertDevice | awk '/IOPlatformUUID/ { split($0, line, "\""); printf("%s\n", line[4]); }'


Above command is working fine on 10.5. Is this not supported on 10.4?

Also I am trying to fetch UUID using below code on 10.4, which is also not working:

void vlm_getSystemUUID_MAC(char * uuid, int bufSize)
{
io_registry_entry_t ioRegistryRoot = IORegistryEntryFromPath(kIOMasterPortDefault, "IOService:/");
CFStringRef uuidCf = (CFStringRef) IORegistryEntryCreateCFProperty(ioRegistryRoot, CFSTR(kIOPlatformUUIDKey), kCFAllocatorDefault, 0);
IOObjectRelease(ioRegistryRoot);
CFStringGetCString(uuidCf, uuid, bufSize, kCFStringEncodingMacRoman);
CFRelease(uuidCf);
}



And the above code executes well on 10.5.

Any help would be appreciated.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top