[Toybox] [PATCH] lspci: add -x.
Rob Landley
rob at landley.net
Thu Apr 6 11:21:29 PDT 2023
On 4/6/23 12:42, enh wrote:
> lgtm, thanks!
>
> /tmp/toybox$ ./toybox lspci | sort
> 00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
> 00:01.0 ISA bridge: Intel Corporation 82371AB/EB/MB PIIX4 ISA (rev 03)
> 00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 03)
> 00:03.0 Non-VGA unclassified device: Red Hat, Inc. Virtio SCSI (rev 00)
> 00:04.0 Ethernet controller: Red Hat, Inc. Virtio network device (rev 00)
> 00:05.0 Unclassified device: Red Hat, Inc. Virtio RNG (rev 00)
> /tmp/toybox$ lspci
> 00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
> 00:01.0 ISA bridge: Intel Corporation 82371AB/EB/MB PIIX4 ISA (rev 03)
> 00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 03)
> 00:03.0 Non-VGA unclassified device: Red Hat, Inc. Virtio SCSI
> 00:04.0 Ethernet controller: Red Hat, Inc. Virtio network device
> 00:05.0 Unclassified device [00ff]: Red Hat, Inc. Virtio RNG
Not printing revision when it's zero is easy enough, but does your lspci -m
print -r info when it's zero?
(It would be so nice if there was some sort of spec for this...)
Dunno what the [00ff] in the Unclassified device is about. The string
"Unclassified" isn't in lsusb.c so it's getting that out pci.ids... yup. Which
means their code is ALSO special casing the zero there. (I mean I _can_ do that...)
Rob
More information about the Toybox
mailing list