- if( (regEntry = IORegistryEntry::fromPath( "/chosen", gIODTPlane ))) {
- data = (OSData *) regEntry->getProperty( "rootpath" );
- regEntry->release();
- if( data) continue;
+ if( (regEntry = IORegistryEntry::fromPath( "/chosen", gIODTPlane ))) {
+ data = OSDynamicCast(OSData, regEntry->getProperty( "root-matching" ));
+ if (data) {
+ matching = OSDynamicCast(OSDictionary, OSUnserializeXML((char *)data->getBytesNoCopy()));
+ if (matching) {
+ continue;
+ }
+ }
+
+ data = (OSData *) regEntry->getProperty( "boot-uuid" );
+ if( data) {
+ uuidStr = (const char*)data->getBytesNoCopy();
+ OSString *uuidString = OSString::withCString( uuidStr );
+
+ // match the boot-args boot-uuid processing below
+ if( uuidString) {
+ IOLog("rooting via boot-uuid from /chosen: %s\n", uuidStr);
+ IOService::publishResource( "boot-uuid", uuidString );
+ uuidString->release();
+ matching = IOUUIDMatching();
+ mediaProperty = "boot-uuid-media";
+ regEntry->release();
+ continue;
+ } else {
+ uuidStr = NULL;