ftdi: extend ftdi_location format
To existing <bus>:<port>,<port> format add <bus>-<port>.<port> support. The last format is used by kernel and other drivers. Change-Id: I6528970d3af4f6a8bf7b27a0f7a763b5957fdf2b Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Reviewed-on: http://openocd.zylin.com/4631 Tested-by: jenkins Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
This commit is contained in:
parent
9e2883b07d
commit
2253a31fb1
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue