80 lines
2.0 KiB
Diff
80 lines
2.0 KiB
Diff
From 14a8ad8f34a02865783d52b88c24c972f38fe47c 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/10] 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 91c4cf3..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 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 34248ed..fe2ff18 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 flashrom_version[] = FLASHROM_VERSION;
|
|
char *chip_to_probe = NULL;
|
|
int verbose = 0;
|
|
|
|
@@ -1677,7 +1679,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 8b13f70..f51652f 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 wiki_header[] = "= Supported devices =\n\n\
|
|
<div style=\"margin-top:0.5em; padding:0.5em 0.5em 0.5em 0.5em; \
|
|
@@ -270,7 +271,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.4
|
|
|