diff options
author | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2009-07-22 20:13:00 +0000 |
---|---|---|
committer | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2009-07-22 20:13:00 +0000 |
commit | 313e022d231b81f7a75188d86f2839c009a1c5cd (patch) | |
tree | d01609749358bee945f908154dffb2194e90b56f | |
parent | 6841cdf21186672c0bbe386e4d4760766f078d85 (diff) | |
download | flashrom-313e022d231b81f7a75188d86f2839c009a1c5cd.zip flashrom-313e022d231b81f7a75188d86f2839c009a1c5cd.tar.gz |
Eliminate version string duplication
Corresponding to flashrom svn r659.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
-rw-r--r-- | flash.h | 1 | ||||
-rw-r--r-- | flashrom.c | 3 | ||||
-rw-r--r-- | print.c | 2 |
3 files changed, 4 insertions, 2 deletions
@@ -379,6 +379,7 @@ int ft2232_spi_write_256(struct flashchip *flash, uint8_t *buf); /* 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); @@ -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 usage(const char *name) void print_version(void) { - printf("flashrom v%s\n", FLASHROM_VERSION); + printf("flashrom v%s\n", flashrom_version); } int main(int argc, char *argv[]) @@ -718,7 +718,7 @@ void print_wiki_tables(void) { 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(); |