Commit a80cfbc3 authored by Carl-Daniel Hailfinger's avatar Carl-Daniel Hailfinger
Browse files

Eliminate version string duplication


Corresponding to flashrom svn r659.
Signed-off-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: default avatarStefan Reinauer <stepan@coresystems.de>
parent fcbdbbc0
...@@ -379,6 +379,7 @@ int ft2232_spi_write_256(struct flashchip *flash, uint8_t *buf); ...@@ -379,6 +379,7 @@ int ft2232_spi_write_256(struct flashchip *flash, uint8_t *buf);
/* flashrom.c */ /* flashrom.c */
extern int verbose; extern int verbose;
extern const char *flashrom_version;
#define printf_debug(x...) { if (verbose) printf(x); } #define printf_debug(x...) { if (verbose) printf(x); }
void map_flash_registers(struct flashchip *flash); void map_flash_registers(struct flashchip *flash);
int read_memmapped(struct flashchip *flash, uint8_t *buf, int start, int len); int read_memmapped(struct flashchip *flash, uint8_t *buf, int start, int len);
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include "flash.h" #include "flash.h"
#include "flashchips.h" #include "flashchips.h"
const char *flashrom_version = FLASHROM_VERSION;
char *chip_to_probe = NULL; char *chip_to_probe = NULL;
int verbose = 0; int verbose = 0;
int programmer = PROGRAMMER_INTERNAL; int programmer = PROGRAMMER_INTERNAL;
...@@ -503,7 +504,7 @@ void usage(const char *name) ...@@ -503,7 +504,7 @@ void usage(const char *name)
void print_version(void) void print_version(void)
{ {
printf("flashrom v%s\n", FLASHROM_VERSION); printf("flashrom v%s\n", flashrom_version);
} }
int main(int argc, char *argv[]) int main(int argc, char *argv[])
......
...@@ -718,7 +718,7 @@ void print_wiki_tables(void) ...@@ -718,7 +718,7 @@ void print_wiki_tables(void)
{ {
time_t t = time(NULL); 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_chips_wiki();
print_supported_chipsets_wiki(); print_supported_chipsets_wiki();
print_supported_boards_wiki(); print_supported_boards_wiki();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment