Just a couple comments; also, thanks for the explanation! On Sun, May 18, 2014 at 07:58:49PM -0500, Rob Landley wrote: > http://landley.net/hg/toybox/rev/1289 > > Headers info: > > As long as we've got a config LSPCI_TEXT, have the -n option live there. > Add a USE() guard in the NEWTOY() line, and move the help text around to > take advantage of the build infrastructure's ability to collate it. Ideally, it might be "emkn"USE_LSPCI_TEXT("@i:"); I have to wonder if that will break things...
Rationale: Without CONFIG_LSPCI_TEXT, the default behaviour is -n. I've got to send in the -i part, which is pretty trivial. (-i specifies the path to pci.ids) > Haven't quite pulled apart the sequencing of this function yet: we > memset all of toybuf to zeroes, and then still need p[size] = 0. I > suspect we don't need _both_ of those, but have to read more to work out > why the memset... We should only need one or the other. The memset() at the start clears the results from previous devices; this might not be absolutely necessary, since p[size] will eradicate any leftover trailing garbage. (One detail to watch for is that lspci -e won't always have the full number of bytes; most pci devices have 6-byte numbers, but some have 4...) Thanks, Isaac Dunham _______________________________________________ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/listinfo.cgi/toybox-landley.net