[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <mj+md-20150407.125023.43354.nikam@ucw.cz>
Date: Tue, 7 Apr 2015 14:57:19 +0200
From: Martin Mares <mj@....cz>
To: "Michael S. Tsirkin" <mst@...hat.com>
Cc: Bjorn Helgaas <bhelgaas@...gle.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Jonathan Corbet <corbet@....net>,
"David S. Miller" <davem@...emloft.net>,
Hans Verkuil <hans.verkuil@...co.com>,
Mauro Carvalho Chehab <mchehab@....samsung.com>,
Alexei Starovoitov <ast@...mgrid.com>,
stephen hemminger <stephen@...workplumber.org>,
Masahiro Yamada <yamada.m@...panasonic.com>,
"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
linux-api@...r.kernel.org, Greg KH <gregkh@...uxfoundation.org>
Subject: Re: [PATCH v2] pci: export class IDs from pci_ids.h
Hello!
> That's a good idea. Martin, could you please answer the following:
> assuming that linux exported linux/pci_ids.h providing class
> IDs that are currently in /usr/include/pci/header.h
> in a header /usr/include/linux/pci_ids.h,
> would libpci be open to replacing part of
> /usr/include/pci/header.h with #include <linux/pci_ids.h>,
> assuming that a solution for old systems that lack this
> header is also provided?
Please remember that libpci is cross-platform. Your proposal would make it
use <linux/pci_ids.h> on Linux and provide its own definitions on all other
systems, which is likely to bring less consistency, not more.
I do not see any point in using kernel headers for things, which are unrelated
to the kernel.
> pciutils does nothing with this value itself, it's possible for a distro
> to ship a wrong header, and no one will notice. OTOH Linux will break if
> it's wrong. In fact there are 3 values libpci does appear to use
> internally:
> PCI_CLASS_BRIDGE_HOST
> PCI_CLASS_DISPLAY_VGA
> PCI_CLASS_BRIDGE_PCI
>
> I'm guessing others are re-exported for the benefit of
> applications using libpci.
Exactly. And I expect that it will be quite similar with the kernel --
most classes defined in <linux/pci_ids.h> are not likely to be used anywhere
in the kernel.
Martin
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists