summaryrefslogtreecommitdiff
path: root/layout.c
diff options
context:
space:
mode:
authorstuge <stuge@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2008-06-18 02:08:40 +0000
committerstuge <stuge@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2008-06-18 02:08:40 +0000
commit805e5aed0942c3014370ca73ee39410470ccf022 (patch)
tree449704116d9462c2f6a23d0551f1b2dab02e0d42 /layout.c
parent3b10a122746ae13594eefaa6caad23943aee982a (diff)
downloadflashrom-805e5aed0942c3014370ca73ee39410470ccf022.tar.gz
Original v2 revision: 3367
flashrom: Force read unknown flash chips When flash chip detection fails, it is still useful and possible to read the flash chip contents. If no flash chip is found in normal probes and the -f -r -c CHIPNAME options are given, a successful probe for the specified chip is forced, and then flashrom reads the flash chip using either the read function for the specified chip, or if there is none, a simple memcpy(). The patch also moves the global variable int force in flashrom.c into main() and passes it as a parameter to layout.c:show_id(), which was the only other function that used the variable. This is needed to avoid confusion with the new parameter int force which is added to flashrom.c:probe_flash() and used to force probe success for the chip named in char *chip_to_probe. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Ward Vandewege <ward@gnu.org> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@259 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'layout.c')
-rw-r--r--layout.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/layout.c b/layout.c
index 46fcc43..a738fb2 100644
--- a/layout.c
+++ b/layout.c
@@ -28,8 +28,6 @@ char *mainboard_vendor = NULL;
char *mainboard_part = NULL;
int romimages = 0;
-extern int force;
-
#define MAX_ROMLAYOUT 16
typedef struct {
@@ -43,7 +41,7 @@ romlayout_t rom_entries[MAX_ROMLAYOUT];
static char *def_name = "DEFAULT";
-int show_id(uint8_t *bios, int size)
+int show_id(uint8_t *bios, int size, int force)
{
unsigned int *walk;