题
我正在尝试使用IOKIT框架获取设备的iOdevicetree路径。我能够获得ioservice路径(IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/SATA@B/AppleMCP79AHCI
)使用此代码的设备:
CFMutableDictionaryRef matchingDict = NULL;
matchingDict = IOServiceMatching("AppleMCP79AHCI");
io_service_t sataService;
io_string_t path;
sataService = IOServiceGetMatchingService(kIOMasterPortDefault, matchingDict);
IORegistryEntryGetPath(sataService, kIOServicePlane, path);
NSLog(@"%s", path);
但是,我需要在 IODeviceTree
飞机。在里面 IODeviceTree
飞机,路径将是类似的 IODeviceTree:/PCI0@0/SATA@B
. 。我尝试简单地更换 kIOServicePlane
和 kIODeviceTreePlane
但是它什么也没归还。我没有经验 IOKit
, ,所以我敢肯定,我在这里做些明显的事情。
谢谢
解决方案
弄清楚了,我只是在使用iOdevicetree中不存在的类名称。
不隶属于 StackOverflow