common: Log the bus/port number when we're probing things

master
Solomon Peachy 1 year ago
parent 5866b8b908
commit 80d8222551
  1. 11
      backend_common.c
  2. 3
      backend_common.h

@ -29,7 +29,7 @@
#include <signal.h>
#include <strings.h> /* For strncasecmp */
#define BACKEND_VERSION "0.116"
#define BACKEND_VERSION "0.117"
#ifndef CORRTABLE_PATH
#ifdef PACKAGE_DATA_DIR
@ -681,15 +681,20 @@ skip_manuf_model:
found = -1;
}
uint8_t bus_num = libusb_get_bus_number(device);
uint8_t port_num = libusb_get_port_number(device);
if (dyesub_debug)
DEBUG("VID: %04X PID: %04X Manuf: '%s' Product: '%s' Serial: '%s' found: %d\n",
desc->idVendor, desc->idProduct, manuf, product, serial, found);
DEBUG("VID/PID %04X/%04X @ bus/port %03d/%03d Manuf: '%s' Product: '%s' Serial: '%s' found: %d\n",
desc->idVendor, desc->idProduct, bus_num, port_num, manuf, product, serial, found);
if (found != -1 && conn) {
conn->iface = iface;
conn->altset = altset;
conn->endp_up = endp_up;
conn->endp_down = endp_down;
conn->bus_num = bus_num;
conn->port_num = port_num;
}
/* Free things up */

@ -204,6 +204,9 @@ struct dyesub_connection {
uint8_t iface;
uint8_t altset;
uint8_t bus_num;
uint8_t port_num;
// TODO: mutex/lock
int type; /* P_XXXX */

Loading…
Cancel
Save