mirror of
https://github.com/RPCS3/libusb.git
synced 2026-07-21 00:16:04 -04:00
linux: Improve topology related debug messages
And use usbi_dbg, rather then fprintf(stderr, ... Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
@@ -1114,8 +1114,9 @@ static void linux_get_parent_info(struct libusb_device *dev, const char *sysfs_d
|
||||
dev->port_number = atoi(tmp + 1);
|
||||
*tmp = '\0';
|
||||
} else {
|
||||
usbi_warn(ctx, "Can not parse sysfs_dir: %s, no parent info",
|
||||
parent_sysfs_dir);
|
||||
free (parent_sysfs_dir);
|
||||
/* shouldn't happen */
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1149,6 +1150,9 @@ retry:
|
||||
goto retry;
|
||||
}
|
||||
|
||||
usbi_dbg("Dev %p (%s) has parent %p (%s) port %d", dev, sysfs_dir,
|
||||
dev->parent_dev, parent_sysfs_dir, dev->port_number);
|
||||
|
||||
free (parent_sysfs_dir);
|
||||
}
|
||||
|
||||
@@ -1186,8 +1190,6 @@ int linux_enumerate_device(struct libusb_context *ctx,
|
||||
goto out;
|
||||
|
||||
linux_get_parent_info(dev, sysfs_dir);
|
||||
fprintf (stderr, "Dev %p (%s) has parent %p\n", dev, sysfs_dir,
|
||||
dev->parent_dev);
|
||||
out:
|
||||
if (r < 0)
|
||||
libusb_unref_device(dev);
|
||||
|
||||
@@ -1 +1 @@
|
||||
#define LIBUSB_NANO 10684
|
||||
#define LIBUSB_NANO 10685
|
||||
|
||||
Reference in New Issue
Block a user