拔下 USB 设备后,USB 设备在 IORegistryExplorer 中显示两次 - 处于活动状态和终止状态
我有一个 USB 设备,我为它开发了一个无代码 kext,以防止 OS X 抢先捕获它。 kext 只是使设备与 IOBluetoothFamily.kext 中的不同 kext 匹配。
当我执行以下操作时,我注意到一个奇怪的行为:
- 重新启动只是为了清除 IO 注册表。
- 启动 IORegistryExplorer。
- 插入设备,获取:注册、匹配、活动且保留 10、忙碌 0。
- 拔下设备,条目变为红色(终止对象)。
- 更新注册表:终止的对象仍然存在(如预期)。此外,非终止对象显示的内容与终止对象相同,但未注册、未匹配、不活动、保留 4、忙 2 除外。
- 清除终止对象 - 只有红色条目会消失。另一个条目仍然存在。
我没有运行任何其他可以访问该设备的应用程序。
我匹配的 kext 是否可能有错误?
I have a USB device that I have developed a codeless kext for to keep OS X from preemptively capturing it. The kext just makes the device match with a different kext in the IOBluetoothFamily.kext.
I am noticing an odd behavior when I perform the following:
- Reboot just to clear the IO Registry.
- Start IORegistryExplorer.
- Plug a device in, get: registered, matched, active with retain 10, busy 0.
- Unplug device, entry goes red (terminated object).
- Update the registry: Terminated object remains (as expected). Also a non-terminated object shows up with the same contents as the terminated, except not registered, not matched, not active, retain 4, busy 2.
- Clear terminated objects - only the red entry will go away. The other entry remains.
I am not running any other application that would access the device.
Is it possible that the kext I am matching to has a bug?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据我的经验,IORegistryExplorer(和 USB Prober)倾向于使对象保持活动状态(通常使得无法卸载 kext),关闭 IORegistryExplorer 往往可以解决问题。
From my experience IORegistryExplorer (and USB Prober) have a tendency to keep objects alive (often making it impossible to unload kexts), closing IORegistryExplorer tends sorts out the problem.