Add support for pciutils/libpci older than 2.2. Needed on the original Xbox running Xebian and a few other ancient systems.
Alec, if this fixes compilation for you, can you please respond with
Acked-by: Your Name your@email
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Index: flashrom-libpci_before_2_2/board_enable.c =================================================================== --- flashrom-libpci_before_2_2/board_enable.c (Revision 1085) +++ flashrom-libpci_before_2_2/board_enable.c (Arbeitskopie) @@ -785,7 +785,14 @@ return -1; }
+#if PCI_LIB_VERSION >= 0x020200 dev = pci_get_dev(pacc, dev->domain, dev->bus, dev->dev, 1); +#else + /* libpci before 2.2 */ + msg_pinfo("Your pciutils/libpci version is too old to support " + "PCI domains. Continuing anyway.\n"); + dev = pci_get_dev(pacc, dev->bus, dev->dev, 1); +#endif if (!dev) { msg_perr("MCP SMBus controller could not be found\n"); return -1;
Am Samstag, den 17.07.2010, 16:47 +0200 schrieb Carl-Daniel Hailfinger:
+#if PCI_LIB_VERSION >= 0x020200 dev = pci_get_dev(pacc, dev->domain, dev->bus, dev->dev, 1); +#else
/* libpci before 2.2 */
msg_pinfo("Your pciutils/libpci version is too old to support "
"PCI domains. Continuing anyway.\n");
If a system needs PCI domain support, you can be pretty sure that a newer libpci is installed, because even lspci would not work correctly as far as I can tell. So I think anyone still having libpci < 2.2 never heard of PCI domains and so we don't need to confuse the user with a message containing a technical term he is not going to understand. Kill this message. You can make it a comment - the source code reader might wonder why it works without the parameter.
Regards, Michael Karcher
On Sat, 2010-07-17 at 16:47 +0200, Carl-Daniel Hailfinger wrote:
Add support for pciutils/libpci older than 2.2. Needed on the original Xbox running Xebian and a few other ancient systems.
Alec, if this fixes compilation for you, can you please respond with
Acked-by: Your Name your@email
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Index: flashrom-libpci_before_2_2/board_enable.c
--- flashrom-libpci_before_2_2/board_enable.c (Revision 1085) +++ flashrom-libpci_before_2_2/board_enable.c (Arbeitskopie) @@ -785,7 +785,14 @@ return -1; }
+#if PCI_LIB_VERSION >= 0x020200 dev = pci_get_dev(pacc, dev->domain, dev->bus, dev->dev, 1); +#else
/* libpci before 2.2 */
msg_pinfo("Your pciutils/libpci version is too old to support "
"PCI domains. Continuing anyway.\n");
dev = pci_get_dev(pacc, dev->bus, dev->dev, 1);
+#endif if (!dev) { msg_perr("MCP SMBus controller could not be found\n"); return -1;
It now compiles fine with that patch, and detects the chip. Acked-by: Alec Wright alecjw@member.fsf.org
On 17.07.2010 18:59, Alec Wright wrote:
On Sat, 2010-07-17 at 16:47 +0200, Carl-Daniel Hailfinger wrote:
Add support for pciutils/libpci older than 2.2. Needed on the original Xbox running Xebian and a few other ancient systems.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
It now compiles fine with that patch, and detects the chip. Acked-by: Alec Wright alecjw@member.fsf.org
Thanks, committed (with the change requested by Michael Karcher) in r1088.
Regards, Carl-Daniel