From 6f24967142db9b4780249d17af1f53ec1cd406e1 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Thu, 3 Mar 2022 21:01:03 -0600 Subject: [PATCH] Add spaces to lsusb output, trigger on the correct entries, tweak help text. --- toys/other/lsusb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/toys/other/lsusb.c b/toys/other/lsusb.c index 8d2aa130..836c4f68 100644 --- a/toys/other/lsusb.c +++ b/toys/other/lsusb.c @@ -28,7 +28,7 @@ config LSUSB List USB hosts/devices. - -i ID database (default /etc/usb.ids) + -i ID database (default /etc/usb.ids[.gz]) */ #define FOR_lsusb @@ -161,11 +161,11 @@ static int list_usb(struct dirtree *new) char *n1, *n2; if (!new->parent) return DIRTREE_RECURSE; - if (3 != scan_uevent(new, 3, (struct scanloop[]){{"BUSNUM=%u", &busnum, 0}, + if (3 == scan_uevent(new, 3, (struct scanloop[]){{"BUSNUM=%u", &busnum, 0}, {"DEVNUM=%u", &devnum, 0}, {"PRODUCT=%x/%x", &pid, &vid}})) { get_names(TT.ids, pid, vid, &n1, &n2); - printf("Bus %03d Device %03d: ID %04x:%04x%s%s\n", + printf("Bus %03d Device %03d: ID %04x:%04x %s %s\n", busnum, devnum, pid, vid, n1, n2); } -- 2.39.2