[Toybox] [PATCH/RFC] lspci text output

Rob Landley rob at landley.net
Wed Aug 7 09:51:44 PDT 2013


On 08/03/2013 08:27:24 PM, Isaac wrote:
> This is the preliminary version of lspci text output support (the  
> location
> of pci.ids is hard-coded to /usr/share/misc/pci.ids, as found on  
> Debian/Ubuntu).
> +88 lines in two files, including reformatting, comments, whitespace,
> and build configuration as well as new code.
> 
> The changes:
> -Add library code to look up descriptions.
> (Added to lib/ because it will be useful for both lspci and lsusb,
> as mentioned by Andre)
> -Add a counter for -n (for the sake of -nn)
> -Add the file stream "db" to GLOBALS and open it conditionally
> -Add name fields to bufs
> -Look up text if enabled and -n is passed never or twice
> -Print text if lookup succeeded

I'm going to merge the library code into the command until there's  
actually a second user. (With only two, I'm tempted to have lsusb be an  
OLDTOY of lspci with very slightly different behavior, but I haven't  
seen them so don't know how much code sharing there would be other than  
the lookup stuff.)

Otherwise, applied to pending.

Rob

 1375894304.0


More information about the Toybox mailing list