Messages in this thread | | | Date | Mon, 30 Nov 1998 18:37:09 +0100 | From | Torsten Landschoff <> | Subject | Re: unkown PCI device |
| |
On Sun, Nov 29, 1998 at 12:00:01PM +0100, Martin Mares wrote: > Hello,
Hi Martin,
> Yes, there never should have been /proc/pci and if there is, it wasn't ever > intended to be parsed by programs. There is _no_ exact format specification you > can rely on when writing a parser. It's The Maintainer's Nightmare -- when > doing any changes (including bug fixes), you never know what application > attempting to parse it will the changes break. And it consumes about 16KB of > precious kernel memory and this amount would be increasing for ever if I didn't > decide not to synchronize the tables with master PCI ID list any more. Aside > >from that, the present implementation breaks on machines with lots of > PCI devices (it just runs out of buffers and truncates the list).
You are right. But I like this /proc/pci-Interface because I can boot from a floppy disk without any driver to get a list of installed PCI-devices. That's way cool :)
Why are the /proc/bus/pci-entries binary? Probably because of efficiency but I really like to read values from /proc with cat...
> > One common complaint about Linux is that is changes too often. > > This wouldn't be just a new version freaking out a PHB, but a real > > incompatible change. > > Nobody knows what applications will break -- maybe only some ancient > X server, maybe more. I've attempted to identify such applications > by printing a warning message when they try to open /proc/pci. > > If only stone-age X servers will break, the right solution is probably > a preload-library replacing open(). If there are more such applications, > we can solve it easily by making /proc/pci a link to /var/run/proc-pci > in the kernel and creating a utility generating this file. But in all > cases, I'll do my best to keep this thing outside the kernel.
Wouldn't it be possible to do this with a tool like kerneld? So you had a very small binary (say 2K) and a datafile to have the /proc/pci-functionality.
> > It's not even a change we need for standards > > compliance. If /proc/pci somehow impedes development, please explain. > > As mentioned above, it is unmaintainable and it probably isn't worth > of the 16KB of kernel memory just for sake of few prehistoric apps. (Anyway, > you can keep it a configurable feature, but it would probably mean all the > distribution makers will leave it compiled in as they do now.)
Yes - and of course 16KB will not be enough for all times...
cu Torsten [unhandled content-type:application/pgp-signature] | |