mirror of
https://github.com/wjwwood/serial.git
synced 2026-01-22 19:54:57 +08:00
Fix empty PortInfo.description/hardware_id on Mac M1
on Mac M1, both PortInfo.description and PortInfo.hardware_id are "n/a", because usb device type name was changed from "IOUSBDevice" to "IOUSBHostInterface".
This commit is contained in:
parent
69e0372cf0
commit
0ff5953e81
@ -95,7 +95,7 @@ get_parent_iousb_device( io_object_t& serial_port )
|
||||
string name = get_class_name(device);
|
||||
|
||||
// Walk the IO Registry tree looking for this devices parent IOUSBDevice.
|
||||
while( name != "IOUSBDevice" )
|
||||
while( name != "IOUSBDevice" && name != "IOUSBHostInterface" )
|
||||
{
|
||||
kern_result = IORegistryEntryGetParentEntry( device,
|
||||
kIOServicePlane,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user