Re: [Toybox] [TOY] lspci - no *alloc

2013-07-27 Thread Felix Janda
Isaac wrote: [...] > > Just for the record: resource is 399 and config 256 bytes. (Extended config > > for pci > > express devices is 4096 bytes.) > > > > Here resource is 4096 bytes. 4096 seems to be the default size of a sysfs entry. Fun with sysfs: $ cd "/sys/bus/pci/devices/:00:00.0" $

Re: [Toybox] [TOY] lspci - no *alloc

2013-07-26 Thread Isaac
On Fri, Jul 26, 2013 at 12:56:48PM +0200, Felix Janda wrote: > Isaac wrote: > > On Thu, Jul 25, 2013 at 10:31:47AM +0200, Felix Janda wrote: > > > Isaac wrote: > [...] > > > > By the way, there are requests for more features (-v/-vv and text > > > > output) > > > > that would mean slightly differ

Re: [Toybox] [TOY] lspci - no *alloc

2013-07-26 Thread Felix Janda
Isaac wrote: > On Thu, Jul 25, 2013 at 10:31:47AM +0200, Felix Janda wrote: > > Isaac wrote: [...] > > > By the way, there are requests for more features (-v/-vv and text output) > > > that would mean slightly different approaches to getting data; > > > (p)readat_name > > > would work in many of

Re: [Toybox] [TOY] lspci - no *alloc

2013-07-25 Thread Isaac
On Thu, Jul 25, 2013 at 10:31:47AM +0200, Felix Janda wrote: > Isaac wrote: > > On Wed, Jul 24, 2013 at 09:20:51PM +0200, Felix Janda wrote: > > > Attached Isaac's toy edited to use toybuf instead of > > > dynamic memory allocation. It could look prettier, though... > > > > > > Felix > > > > > Br

Re: [Toybox] [TOY] lspci - no *alloc

2013-07-25 Thread Felix Janda
Isaac wrote: > On Wed, Jul 24, 2013 at 09:20:51PM +0200, Felix Janda wrote: > > Attached Isaac's toy edited to use toybuf instead of > > dynamic memory allocation. It could look prettier, though... > > > > Felix > > > Broken: > /toybox lspci -e > 00:00.0 Class 0600: 8086 > :27ac > > 00:02.0 Cla

Re: [Toybox] [TOY] lspci - no *alloc

2013-07-24 Thread Isaac
On Wed, Jul 24, 2013 at 09:20:51PM +0200, Felix Janda wrote: > Attached Isaac's toy edited to use toybuf instead of > dynamic memory allocation. It could look prettier, though... > > Felix > Broken: /toybox lspci -e 00:00.0 Class 0600: 8086 :27ac 00:02.0 Class 0300: 8086 :27ae .. /toybox lspc

Re: [Toybox] [TOY] lspci - no *alloc

2013-07-24 Thread Felix Janda
Attached Isaac's toy edited to use toybuf instead of dynamic memory allocation. It could look prettier, though... Felix /* * lspci - written by Isaac Dunham USE_LSPCI(NEWTOY(lspci, "emkns:", TOYFLAG_USR|TOYFLAG_BIN)) config LSPCI bool "lspci" default n help usage: lspci [-ekmn] L