[Toybox] [PATCH] Correct a condition to evaluate scan_uevent() result
Rob Landley
rob at landley.net
Thu Mar 3 19:29:45 PST 2022
On 3/3/22 6:23 PM, enh via Toybox wrote:
> Fix: 222572616
> Test: adb root && adb shell lsusb
> ---
>
> diff --git a/toys/other/lsusb.c b/toys/other/lsusb.c
> index 8d2aa13..cbe8091 100644
> --- a/toys/other/lsusb.c
> +++ b/toys/other/lsusb.c
> @@ -161,7 +161,7 @@
> 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}}))
I saw https://github.com/landley/toybox/pull/323 first. :)
Rob
More information about the Toybox
mailing list