[Toybox] [PATCH] lspci -i (was Re: [CLEANUP] lspci first pass)

Rob Landley rob at landley.net
Tue May 20 19:24:07 PDT 2014


On 05/20/14 20:23, Isaac Dunham wrote:
> lspci text output: add -i, allow -n when disabled
> 
> -i is how standard lspci handles changing the PCI ID database.
> lspci -n should be a no-op when text is disabled.
> --
> I don't know the best way to document that -i should normally point to 
> /path/to/pci.ids ... please adjust the help appropriately.
> 
> Surprisingly enough, "emkn"USE_LSPCI_TEXT("@i:") works without any 
> mucking around.

Applied.

I note that if you had any other GLOBALS() filled out by the option
handling it wouldn't work. (Sort of the same way you have char blah[0];
at the _end_ of a struct, you want the options that are only sometimes
filled out at the end of the list, and thus at the left of the option
string.)

But in this case, it's not an issue. (And if it was an issue you could
just leave the options in the string unconditionally and only
document/use them when the option's enabled. Or if all else failed, ugly
#ifdefs in the GLOBALS block...)

Rob

 1400639047.0


More information about the Toybox mailing list