/ dev中的MacOS内核,.kext和设备

时间:2013-06-19 15:42:02

标签: macos kernel driver hardware kernel-extension

我的USB 3G调制解调器出了问题,我做了调试,但我无法确定.kext文件在/ dev中创建设备

如何确定/ dev中的设备文件(如/dev/usbdriver.001)和.kext之间的关系?

1 个答案:

答案 0 :(得分:0)

要创建/ dev条目,Kext通常会使用IOxxxBSDClient(例如Serial,Media等)。您可以使用ioreg -l,并查找它,如下所示:

... (this would be the parent class) ...
|   +-o IOSerialBSDClient  <class IOSerialBSDClient, id 0x100000385, registered, matched, active, busy 0 (0 ms), retain 5>
      | |       {
      | |         "IOClass" = "IOSerialBSDClient"
      | |         "CFBundleIdentifier" = "com.apple.iokit.IOSerialFamily"
      | |         "IOProviderClass" = "IOSerialStreamSync"
      | |         "IOTTYBaseName" = "Bluetooth-Serial-1"
      | |         "IOSerialBSDClientType" = "IORS232SerialStream"
      | |         "IOProbeScore" = 1000
      | |         "IOCalloutDevice" = "/dev/cu.Bluetooth-Serial-1"
      | |         "IODialinDevice" = "/dev/tty.Bluetooth-Serial-1"
      | |         "IOMatchCategory" = "IODefaultMatchCategory"
      | |         "IOTTYDevice" = "Bluetooth-Serial-1"
      | |         "IOResourceMatch" = "IOBSD"
      | |         "IOTTYSuffix" = ""
      | |       }

这通常可以解决问题。