From cbc55d0c2922bf7a02ebad8e15a20f0250ae5443 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Fri, 25 Aug 2006 19:21:42 +0000 Subject: [PATCH] Print a warning if southbridge is not known Corresponding to flashrom svn r61 and coreboot v2 svn r2390. --- README | 2 +- flash_enable.c | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/README b/README index 32c401aa2..e74560891 100644 --- a/README +++ b/README @@ -77,6 +77,6 @@ DOC support ----------- DISK on Chip support is currently disabled since it is considered unstable. -Change CFLAGS in the Makefile to enable it. +Change CFLAGS in the Makefile to enable it: Remove -DDISABLE_DOC from CFLAGS. diff --git a/flash_enable.c b/flash_enable.c index ccd670a92..e110f2a60 100644 --- a/flash_enable.c +++ b/flash_enable.c @@ -506,11 +506,15 @@ int enable_flash_write() } } - /* now do the deed. */ - if (enable) { - printf("Enabling flash write on %s...", enable->name); - if (enable->doit(dev, enable->name) == 0) - printf("OK\n"); + if (!enable) { + printf("Warning: Unknown system. Flash detection " + "will most likely fail.\n"); + return 1; } + + /* now do the deed. */ + printf("Enabling flash write on %s...", enable->name); + if (enable->doit(dev, enable->name) == 0) + printf("OK\n"); return 0; }