Author: hailfinger Date: 2009-07-22 22:13:00 +0200 (Wed, 22 Jul 2009) New Revision: 659
Modified: trunk/flash.h trunk/flashrom.c trunk/print.c Log: Eliminate version string duplication.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net Acked-by: Stefan Reinauer stepan@coresystems.de
Modified: trunk/flash.h =================================================================== --- trunk/flash.h 2009-07-22 20:09:28 UTC (rev 658) +++ trunk/flash.h 2009-07-22 20:13:00 UTC (rev 659) @@ -379,6 +379,7 @@
/* flashrom.c */ extern int verbose; +extern const char *flashrom_version; #define printf_debug(x...) { if (verbose) printf(x); } void map_flash_registers(struct flashchip *flash); int read_memmapped(struct flashchip *flash, uint8_t *buf, int start, int len);
Modified: trunk/flashrom.c =================================================================== --- trunk/flashrom.c 2009-07-22 20:09:28 UTC (rev 658) +++ trunk/flashrom.c 2009-07-22 20:13:00 UTC (rev 659) @@ -30,6 +30,7 @@ #include "flash.h" #include "flashchips.h"
+const char *flashrom_version = FLASHROM_VERSION; char *chip_to_probe = NULL; int verbose = 0; int programmer = PROGRAMMER_INTERNAL; @@ -503,7 +504,7 @@
void print_version(void) { - printf("flashrom v%s\n", FLASHROM_VERSION); + printf("flashrom v%s\n", flashrom_version); }
int main(int argc, char *argv[])
Modified: trunk/print.c =================================================================== --- trunk/print.c 2009-07-22 20:09:28 UTC (rev 658) +++ trunk/print.c 2009-07-22 20:13:00 UTC (rev 659) @@ -718,7 +718,7 @@ { time_t t = time(NULL);
- printf(wiki_header, ctime(&t), FLASHROM_VERSION); + printf(wiki_header, ctime(&t), flashrom_version); print_supported_chips_wiki(); print_supported_chipsets_wiki(); print_supported_boards_wiki();