From 96edbd9249a39dae17ef29b7232741f17d72f5b0 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Thu, 2 Apr 2020 23:44:33 +0100 Subject: [PATCH] st/prober: Print serial, product and manufacturer from libuvc --- src/xrt/state_trackers/prober/p_libuvc.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/xrt/state_trackers/prober/p_libuvc.c b/src/xrt/state_trackers/prober/p_libuvc.c index b624ccc62..c4e28839a 100644 --- a/src/xrt/state_trackers/prober/p_libuvc.c +++ b/src/xrt/state_trackers/prober/p_libuvc.c @@ -68,7 +68,6 @@ p_libuvc_probe(struct prober *p) uint8_t addr = uvc_get_device_address(device); uint16_t vendor = desc->idVendor; uint16_t product = desc->idProduct; - uvc_free_device_descriptor(desc); ret = p_dev_get_usb_dev(p, bus, addr, vendor, product, &pdev); @@ -78,8 +77,14 @@ p_libuvc_probe(struct prober *p) "\t\tvendor_id: %04x\n" "\t\tproduct_id: %04x\n" "\t\tbus: %i\n" - "\t\taddr: %i", - (void *)pdev, ret, vendor, product, bus, addr); + "\t\taddr: %i\n" + "\t\tserial: %s\n" + "\t\tmanuf: %s\n" + "\t\tproduct: %s", + (void *)pdev, ret, vendor, product, bus, addr, + desc->serialNumber, desc->manufacturer, desc->product); + + uvc_free_device_descriptor(desc); if (ret != 0) { P_ERROR(p, "p_dev_get_usb_device failed!");