[Toybox] [TOY] lspci - no *alloc

Felix Janda felix.janda at posteo.de
Sat Jul 27 01:22:36 PDT 2013


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/0000:00:00.0"
$ wc -c resource
4096
$ cat resource | wc -c
399
$ wc -c <resource
4096

See also src/linux/drivers/pci/pci-sysfs.c .

Anyway 399=7*(3*(2+16)+3).

[...]
> > Are the names in the pci database required to be less than 128 bytes long? (The longest
> > name I found in my local database is 92 bytes.)
> 
> No hard requirement, but I'd think that a 2-line name should be 
> truncated somewhere.

That's true.

Felix

 1374913356.0


More information about the Toybox mailing list