> Why isn't this exposed to the sysctl interface? I would suggest
> /proc/sys/dev/pci as a place for it. Tools like lspci would then use
> sysctl(2) instead of getdents, open, read.
There is no need to use getdents -- you just look up the device you
want in /proc/bus/pci/devices and open the appropriate config space
file, using pread and pwrite for all accesses.
Have a nice fortnight
-- Martin `MJ' Mares <mj@gts.cz> http://atrey.karlin.mff.cuni.cz/~mj/ Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth "Mr. Worf, scan that ship." "Aye, Captain... 300 DPI?"