From 6e8d2f6b2a436e58b5753b8bda6fefe25ea63078 Mon Sep 17 00:00:00 2001 From: stefanrueger Date: Mon, 27 Oct 2025 11:22:12 +0100 Subject: [PATCH] Rename bus:device to busdir:devicefile for usbtiny.c --- src/usbtiny.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/usbtiny.c b/src/usbtiny.c index f2b493e0..88f15831 100644 --- a/src/usbtiny.c +++ b/src/usbtiny.c @@ -288,11 +288,11 @@ static int usbtiny_open(PROGRAMMER *pgm, const char *port) { pmsg_debug("%s(\"%s\")\n", __func__, port); if(!str_starts(port, "usb:") && !str_eq(port, "usb")) { - pmsg_error("invalid -P %s; drop this option or use -P usb::\n", port); + pmsg_error("invalid -P %s; drop this option or use -P usb::\n", port); return -1; } - // Calculate bus and device names from -P usb:: option if present + // Calculate bus and device names from -P usb:: option if present if(str_starts(port, "usb:")) { bus_name = port + 4; if((dev_name = strchr(bus_name, ':'))) @@ -324,9 +324,9 @@ static int usbtiny_open(PROGRAMMER *pgm, const char *port) { for(bus = usb_busses; bus; bus = bus->next) { for(dev = bus->devices; dev; dev = dev->next) { if(dev->descriptor.idVendor == vid && dev->descriptor.idProduct == pid) { // Found match? - pmsg_notice("found USBtiny with bus:device = %s:%s\n", bus->dirname, dev->filename); + pmsg_notice("found USBtiny with busdir:devicefile = %s:%s\n", bus->dirname, dev->filename); - // If -P usb:: was given, skip non-matching bus:device + // If -P usb:: was given, skip non-matching busdir:devicefile if(bus_name && dev_name) if(!str_busdev_eq(bus->dirname, bus_name) || !str_busdev_eq(dev->filename, dev_name)) continue; @@ -343,7 +343,7 @@ static int usbtiny_open(PROGRAMMER *pgm, const char *port) { } if(bus_name && !dev_name) { // Delayed error message, so found devices are printed with -P usb:xyz - pmsg_error("invalid -P %s; use -P usb:: or -P usb\n", port); + pmsg_error("invalid -P %s; drop -P option or use -P usb::\n", port); return -1; }