[flashrom] [PATCH] Add support for libpci older than 2.2
Alec Wright
alecjw at member.fsf.org
Sat Jul 17 18:59:45 CEST 2010
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 at email>
>
> Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at 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 at member.fsf.org>
More information about the flashrom
mailing list