common: Log the IEEE1284 ID in DEBUG >= 2

This commit is contained in:
Solomon Peachy 2019-11-05 16:36:36 -05:00
parent 9a719b26ae
commit da4c5eb026
1 changed files with 6 additions and 1 deletions

View File

@ -31,7 +31,7 @@
#include <errno.h>
#include <signal.h>
#define BACKEND_VERSION "0.97"
#define BACKEND_VERSION "0.98"
#ifndef URI_PREFIX
#error "Must Define URI_PREFIX"
#endif
@ -152,6 +152,11 @@ char *get_device_id(struct libusb_device_handle *dev, int iface)
memmove(buf, buf + 2, length);
buf[length] = '\0';
/* Don't forget to log! */
if (dyesub_debug > 2) {
DEBUG("IEEE1284: %s\n", buf);
}
done:
return buf;
}