Fix compilation if CONFIG_INTERNAL=no.
Fix compilation if everything except CONFIG_SATAMV is no.
Do not compile in PCI support for wiki printing if no PCI devices are
supported.

Note: The flashrom.c hunk is ugly. Suggestions how to solve the ugliness
are appreciated.

Signed-off-by: Carl-Daniel Hailfinger <[email protected]>

Index: flashrom-compilefixes/print_wiki.c
===================================================================
--- flashrom-compilefixes/print_wiki.c  (Revision 1275)
+++ flashrom-compilefixes/print_wiki.c  (Arbeitskopie)
@@ -246,6 +246,8 @@
        printf("\n|}\n\n|}\n");
 }
 
+/* Not needed for CONFIG_INTERNAL, but for all other PCI-based programmers. */
+#if 
CONFIG_NIC3COM+CONFIG_NICREALTEK+CONFIG_NICNATSEMI+CONFIG_GFXNVIDIA+CONFIG_DRKAISER+CONFIG_SATASII+CONFIG_ATAHPT+CONFIG_NICINTEL_SPI+CONFIG_OGP_SPI+CONFIG_SATAMV
 >= 1
 static void print_supported_pcidevs_wiki(const struct pcidev_status *devs)
 {
        int i = 0;
@@ -262,6 +264,7 @@
                       (devs[i].status == NT) ? "?3" : "OK");
        }
 }
+#endif
 
 void print_supported_wiki(void)
 {
Index: flashrom-compilefixes/flashrom.c
===================================================================
--- flashrom-compilefixes/flashrom.c    (Revision 1275)
+++ flashrom-compilefixes/flashrom.c    (Arbeitskopie)
@@ -1186,9 +1186,12 @@
        if (!flash || !flash->name)
                return NULL;
 
+#if CONFIG_INTERNAL == 1
        if (programmer_table[programmer].map_flash_region == physmap) {
                snprintf(location, sizeof(location), "at physical address 
0x%lx", base);
-       } else { 
+       } else
+#endif
+       { 
                snprintf(location, sizeof(location), "on %s", 
programmer_table[programmer].name);
        }
 
Index: flashrom-compilefixes/programmer.h
===================================================================
--- flashrom-compilefixes/programmer.h  (Revision 1275)
+++ flashrom-compilefixes/programmer.h  (Arbeitskopie)
@@ -229,7 +229,7 @@
 #endif
 
 /* print.c */
-#if 
CONFIG_NIC3COM+CONFIG_NICREALTEK+CONFIG_NICNATSEMI+CONFIG_GFXNVIDIA+CONFIG_DRKAISER+CONFIG_SATASII+CONFIG_ATAHPT+CONFIG_NICINTEL_SPI+CONFIG_OGP_SPI
 >= 1
+#if 
CONFIG_NIC3COM+CONFIG_NICREALTEK+CONFIG_NICNATSEMI+CONFIG_GFXNVIDIA+CONFIG_DRKAISER+CONFIG_SATASII+CONFIG_ATAHPT+CONFIG_NICINTEL_SPI+CONFIG_OGP_SPI+CONFIG_SATAMV
 >= 1
 void print_supported_pcidevs(const struct pcidev_status *devs);
 #endif
 


-- 
http://www.hailfinger.org/


_______________________________________________
flashrom mailing list
[email protected]
http://www.flashrom.org/mailman/listinfo/flashrom

Reply via email to