[flashrom] [PATCH] Hack libpci not to exit(1) during init if PCI does not work

David Hendricks dhendrix at google.com
Thu Jul 7 01:55:21 CEST 2011


Impressive!

On Wed, Jul 6, 2011 at 3:34 PM, Carl-Daniel Hailfinger <
c-d.hailfinger.devel.2006 at gmx.net> wrote:

> -       /* Initialize PCI access for flash enables */

-       pacc = pci_alloc();     /* Get the pci_access structure */
> -       /* Set all options you want -- here we stick with the defaults */
> -       pci_init(pacc);         /* Initialize the PCI library */
> +       if (flashrom_pci_init())
> +               return 1;
>        pci_scan_bus(pacc);     /* We want to get the list of devices */
>

Change those last three lines to:
if (!flashrom_pci_init())
        pci_scan_bus(pacc);

and it works on systems w/o PCI (at least it did on ARM)

Here are my test results with this patch and the tegra2 patch:
http://paste.flashrom.org/view.php?id=683

-- 
David Hendricks (dhendrix)
Systems Software Engineer, Google Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.flashrom.org/pipermail/flashrom/attachments/20110706/a285a555/attachment.html>


More information about the flashrom mailing list