ioregistryentry :: frompath()失败
-
22-09-2019 - |
题
我的iokit kext失败了 在较老的iMac上 在Ioregistry的Devicetree平面中找到 /选项路径。是否有人遇到过这一点或知道为什么会失败? 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");
}
}
解决方案
用于创建ioregistryentry的路径无效 根据API: :它应该以一个':'开头。 I/O平面不应包含在路径中,而应作为第二个参数。
不隶属于 StackOverflow