> Make a system call that returns an array of 16 bit numbers?
>
> I prefer having /proc as it is, but binary files in /proc join the
> disadvantages of /proc (overhead) and kernel calls (the need for
> special programs to access the information). So please either make
> files human-readable or just get rid of them altogether.
You need no special programs to read binary config space in /proc:
just use od -x /proc/...
I'd prefer the following approach:
- Add a kernel call for PCI config space access.
- Add a single file in /proc, summarizing all known PCI devices
(one per line) together with basic information about them (those found
in struct pci_dev) in text format.
The lspci (?) utility would read the device list from /proc and extract
all other information via the kernel call. Kernel hackers could simply
read the /proc file itself and get the basic info directly.
Any better ideas?
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 "Disc space, the final frontier!"