flashrom/flashrom-0003-Use-flashrom-s-version-from-config.h.patch
Peter Lemenkov 523d4bdbfa Updated to latest svn ver. 1250 (post-release snapshot for 0.9.3)
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
2011-01-04 20:20:42 +03:00

80 lines
2.0 KiB
Diff

From 969d01d210afc2fc7a69c85c9f23ae3061201552 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/13] 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 250482f..630f7c6 100644
--- a/flash.h
+++ b/flash.h
@@ -188,7 +188,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 f3497d0..49e1a52 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -31,6 +31,9 @@
#include <stdlib.h>
#include <ctype.h>
#include <getopt.h>
+
+#include "config.h"
+
#if HAVE_UTSNAME == 1
#include <sys/utsname.h>
#endif
@@ -38,7 +41,6 @@
#include "flashchips.h"
#include "programmer.h"
-const char * const flashrom_version = FLASHROM_VERSION;
char *chip_to_probe = NULL;
int verbose = 0;
@@ -1662,7 +1664,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 48e0122..eb044a4 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.4