1
0
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:
Xiaolei Wang 2022-08-03 22:34:29 +08:00 committed by GitHub
parent 69e0372cf0
commit 0ff5953e81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,