From b5d6b6405a831a0b8694629fefa228b7f1f2eb84 Mon Sep 17 00:00:00 2001
From: Peter Lemenkov <lemenkov@gmail.com>
Date: Fri, 17 Sep 2010 22:32:07 +0400
Subject: [PATCH 03/12] Use flashrom's version from config.h
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
---
flash.h | 1 -
flashrom.c | 6 ++++--
print_wiki.c | 3 ++-
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/flash.h b/flash.h
index 9566af9..33a7890 100644
--- a/flash.h
+++ b/flash.h
@@ -187,7 +187,6 @@ enum write_granularity {
};
extern enum chipbustype buses_supported;
extern int verbose;
-extern const char * const flashrom_version;
extern char *chip_to_probe;
void map_flash_registers(struct flashchip *flash);
int read_memmapped(struct flashchip *flash, uint8_t *buf, int start, int len);
diff --git a/flashrom.c b/flashrom.c
index e5e334c..dd6d6df 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -30,6 +30,9 @@
#include <string.h>
#include <stdlib.h>
#include <getopt.h>
+
+#include "config.h"
+
#if HAVE_UTSNAME == 1
#include <sys/utsname.h>
#endif
@@ -37,7 +40,6 @@
#include "flashchips.h"
#include "programmer.h"
-const char * const flashrom_version = FLASHROM_VERSION;
char *chip_to_probe = NULL;
int verbose = 0;
@@ -1420,7 +1422,7 @@ void print_sysinfo(void)
void print_version(void)
{
- msg_ginfo("flashrom v%s", flashrom_version);
+ msg_ginfo("flashrom v%s", PACKAGE_VERSION);
print_sysinfo();
}
diff --git a/print_wiki.c b/print_wiki.c
index 1b46dd0..4363eba 100644
--- a/print_wiki.c
+++ b/print_wiki.c
@@ -26,6 +26,7 @@
#include "flash.h"
#include "flashchips.h"
#include "programmer.h"
+#include "config.h"
static const char * const wiki_header = "= Supported devices =\n\n\
<div style=\"margin-top:0.5em; padding:0.5em 0.5em 0.5em 0.5em; \
@@ -267,7 +268,7 @@ void print_supported_wiki(void)
{
time_t t = time(NULL);
- printf(wiki_header, ctime(&t), flashrom_version);
+ printf(wiki_header, ctime(&t), PACKAGE_VERSION);
print_supported_chips_wiki(2);
#if CONFIG_INTERNAL == 1
print_supported_chipsets_wiki(3);
--
1.7.3.1