From 2253a31fb19cbc501fd8e54bfd43310c35dacd4b Mon Sep 17 00:00:00 2001 From: Oleksij Rempel Date: Sat, 4 Aug 2018 14:49:35 +0200 Subject: [PATCH] ftdi: extend ftdi_location format To existing :, format add -. support. The last format is used by kernel and other drivers. Change-Id: I6528970d3af4f6a8bf7b27a0f7a763b5957fdf2b Signed-off-by: Oleksij Rempel Reviewed-on: http://openocd.zylin.com/4631 Tested-by: jenkins Reviewed-by: Matthias Welwarsky --- src/jtag/drivers/mpsse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/jtag/drivers/mpsse.c b/src/jtag/drivers/mpsse.c index 06d008b476..89248921ae 100644 --- a/src/jtag/drivers/mpsse.c +++ b/src/jtag/drivers/mpsse.c @@ -120,7 +120,7 @@ static bool device_location_equal(libusb_device *device, const char *location) LOG_DEBUG("device path has %i steps", path_len); - ptr = strtok(loc, ":"); + ptr = strtok(loc, "-:"); if (ptr == NULL) { LOG_DEBUG("no ':' in path"); goto done; @@ -132,7 +132,7 @@ static bool device_location_equal(libusb_device *device, const char *location) path_step = 0; while (path_step < 7) { - ptr = strtok(NULL, ","); + ptr = strtok(NULL, ".,"); if (ptr == NULL) { LOG_DEBUG("no more tokens in path at step %i", path_step); break; -- 2.30.2