[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: State of pci.ids



Hello!

> Readable: I don't find that actual version is readable, in particular
> with biggest vendor (i.e. I need a lot of scroll to see if I'm in the
> right section).

This is however not solved by repeating the vendor ID at every line,
because people usually do not remember the vendor by the ID ;-)

> It was a side note: if you need to change it (because of split, etc.)
> I propose to change also the format.  Merging different sources is not
> so simple (but also not so complex). I would move the logic from code
> (and runtime) to data.

The problem is that your proposal solves only a fraction of the whole
problem and quite likely the least important one. For example, if you
use `cat | sort -su' to merge ID files, you get the comments completely
wrong and you are not able to handle deletions.

The tools we use for the maintenance of the ID database work with a similar
format internally, but with several tab-separated fields on each line
(name, comment, approval state etc.), which is useful in scripts, but
awful as a distribution format (fixed order of fields etc.). So I would
rather like to keep the current distribution format and let the people
use the tools to convert it to whatever they wish.

> Could you elaborate this?
> grep '^aaaa bbbb'
> grep '^.... .... aaaa bbbb'
> would give the subsystem in two simple lines.

Yes, except that it depends on the version of the ID file. Three years
ago, the stand-alone subsystems did not exist, so people would assume
that the second line is sufficient. Suddenly, it no longer is. Extensibility
is important, therefore I believe that it is better to use the lookup
algorithm from libpci as a black box.

> But I don't find any of such kind of detection in kernel (e.g.
> no checking of subsystem ids without a fix vendor/device ids).

Many motherboard manufacturers tend to stick a common subsystem ID on
all devices on the board. It rarely makes a functional differences, so
the drivers usually do not match such ID's (even if the PCI core in the
kernel supports such matches), but lspci should tell that the ID belongs
to a motherboard and it is somewhat boring to repeat it all over for
all devices.

> ok. This would be nice! So maybe we could have a common tools that
> handle, grep, merge different ids files.

Yes, we definitely want to release such a toolbox.

				Have a nice fortnight
-- 
Martin `MJ' Mares                          <mj@ucw.cz>   http://mj.ucw.cz/
Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth
This message is transmitted on 100% recycled electrons.


Reply to: