- // (strip the plane name)
- char * tail = strchr(str1, ':');
- if (!tail)
- tail = str1 - 1;
- data = OSData::withBytes(tail + 1, strlen(tail + 1));
- sprintf(str2, ",%qx", vars->extentMap[0]);
- data->appendBytes(str2, strlen(str2));
+ char str2[24];
+
+#if __i386__
+ if (!gIOCreateEFIDevicePathSymbol)
+ gIOCreateEFIDevicePathSymbol = OSSymbol::withCString("CreateEFIDevicePath");
+
+ sprintf(str2, "%qx", vars->extentMap[0]);
+
+ err = IOService::getPlatform()->callPlatformFunction(
+ gIOCreateEFIDevicePathSymbol, false,
+ (void *) part, (void *) str2, (void *) true,
+ (void *) &data);
+#else
+ char str1[256];
+ int len = sizeof(str1);
+
+ if (!part->getPath(str1, &len, gIODTPlane))
+ err = kIOReturnNotFound;
+ else
+ {
+ sprintf(str2, ",%qx", vars->extentMap[0]);
+ // (strip the plane name)
+ char * tail = strchr(str1, ':');
+ if (!tail)
+ tail = str1 - 1;
+ data = OSData::withBytes(tail + 1, strlen(tail + 1));
+ data->appendBytes(str2, strlen(str2));
+ }
+#endif
+ if (kIOReturnSuccess == err)