IORegistryEntry::fromPath() 失败
我的 IOKit kext 在旧版 iMac 上无法定位 IORegistry 的 DeviceTree 平面中的 /options 路径。有其他人遇到过这个或知道为什么它会失败吗? 谢谢->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");
}
}
my IOKit kext is failing on older iMacs to locate the /options path in the DeviceTree plane of the IORegistry. has anybody else encountered this or know why it would fail?
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");
}
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
用于创建 IORegistryEntry 的路径无效,因为 根据 API:它应该以 ': 开头'。 I/O 平面不应包含在路径中,而应作为第二个参数。
The path used to create IORegistryEntry is invalid as per the API: it should begins with a ':'. The I/O plane should not be included in the path, but as the second parameter.