From 5fb14f44cb9bd7285e2605bec143985e9a62a02f Mon Sep 17 00:00:00 2001 From: Krzysztof Opasiak Date: Mon, 5 Sep 2016 09:10:16 +0200 Subject: [PATCH] Fix busid param parsing Change-Id: Ia3e6047ccd9f07d1a834c4eb58408d0afca1c8c3 Signed-off-by: Krzysztof Opasiak --- libthor/thor_usb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libthor/thor_usb.c b/libthor/thor_usb.c index 9c93af2..fbb35aa 100644 --- a/libthor/thor_usb.c +++ b/libthor/thor_usb.c @@ -73,6 +73,7 @@ static int check_busid_match(const char *expected, libusb_device *dev) expected = strchr(expected, '-'); if (!expected) return -EINVAL; + ++expected; nports = libusb_get_port_numbers(dev, (uint8_t *)dev_port, sizeof(dev_port)); if (nports < 0) @@ -94,6 +95,7 @@ static int check_busid_match(const char *expected, libusb_device *dev) else break; } + ++expected; } return 0; -- 2.34.1