IORegistryEntry :: fromPath () échouent
-
22-09-2019 - |
Question
mon IOKit kext échoue sur iMacs anciens pour localiser le / options chemin dans le plan DeviceTree du IORegistry. a rencontré quelqu'un d'autre ou ce savoir pourquoi il échouerait? thx-> adv
IORegistryEntry* regEntry = IORegistryEntry::fromPath("/options", gIODTPlane);
if(NULL == regEntry)
{
regEntry = IORegistryEntry::fromPath("IODeviceTree:/options");
if(NULL == regEntry)
{
DEBUG_LOG("getIORegOptionsEntry: FAILURE TO LOCATE: IODeviceTree:/options\n");
}
}
La solution
Le chemin utilisé pour créer IORegistryEntry est invalide par l'API : il se doit commence par une ':'. Le plan I / O ne doit pas être inclus dans le chemin, mais en tant que second paramètre.
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow