[Toybox] [PATCH] Correct a condition to evaluate scan_uevent() result
Rob Landley
rob at landley.net
Thu Mar 3 19:34:42 PST 2022
On 3/3/22 6:27 PM, enh via Toybox wrote:
> (oops... didn't see that changyeonjo had created a github pull request already
> --- this is his same change, just via a different route.)
> @@ -203,7 +203,7 @@
> }
>
> // Load uevent data, look up names in database
> - if (3 != scan_uevent(new, 3, (struct scanloop[]){{"DRIVER=", &driver, 0},
> + if (3 == scan_uevent(new, 3, (struct scanloop[]){{"DRIVER=", &driver, 0},
> {"PCI_CLASS=%x", cvd, 0}, {"PCI_ID=%x:%x", cvd+1, cvd+2}})) return 0;
That one's supposed to return 0 when the count doesn't match. If it returns 0
when the count DOES match I don't get any output on lspci.
(lsusb is if (true) do_thing; lspci is if (false) return 0; do_thing; The
difference is that lspci has a much bigger do_thing and I didn't want to indent
it all. :)
Rob
More information about the Toybox
mailing list