Author: hailfinger Date: Tue Mar 8 01:09:11 2011 New Revision: 1278 URL: http://flashrom.org/trac/flashrom/changeset/1278
Log: 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.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net Acked-by: Michael Karcher flashrom@mkarcher.dialup.fu-berlin.de
Modified: trunk/flashrom.c trunk/print_wiki.c trunk/programmer.h
Modified: trunk/flashrom.c ============================================================================== --- trunk/flashrom.c Mon Mar 7 16:32:58 2011 (r1277) +++ trunk/flashrom.c Tue Mar 8 01:09:11 2011 (r1278) @@ -1186,11 +1186,12 @@ if (!flash || !flash->name) return NULL;
- if (programmer_table[programmer].map_flash_region == physmap) { +#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); - }
msg_cinfo("%s chip "%s %s" (%d KB, %s) %s.\n", force ? "Assuming" : "Found",
Modified: trunk/print_wiki.c ============================================================================== --- trunk/print_wiki.c Mon Mar 7 16:32:58 2011 (r1277) +++ trunk/print_wiki.c Tue Mar 8 01:09:11 2011 (r1278) @@ -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) {
Modified: trunk/programmer.h ============================================================================== --- trunk/programmer.h Mon Mar 7 16:32:58 2011 (r1277) +++ trunk/programmer.h Tue Mar 8 01:09:11 2011 (r1278) @@ -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