From 0ff5953e811c997ed406c013f5f7a0a9aba9c9a6 Mon Sep 17 00:00:00 2001 From: Xiaolei Wang Date: Wed, 3 Aug 2022 22:34:29 +0800 Subject: [PATCH] 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". --- src/impl/list_ports/list_ports_osx.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/impl/list_ports/list_ports_osx.cc b/src/impl/list_ports/list_ports_osx.cc index 333c55c2..69465216 100644 --- a/src/impl/list_ports/list_ports_osx.cc +++ b/src/impl/list_ports/list_ports_osx.cc @@ -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,