summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Stuge <peter@stuge.se>2008-10-10 20:43:17 +0000
committerPeter Stuge <peter@stuge.se>2008-10-10 20:43:17 +0000
commit4e40e46d49fef1a9ec15a40c10deb88f11c2cada (patch)
tree0c2dae4dfc28eafdb841abd5f9a16dffc604303e
parent32965d8dbb7623262ed4878e2705c991a8aeecba (diff)
downloadcoreboot-4e40e46d49fef1a9ec15a40c10deb88f11c2cada.tar.xz
flashrom: Check that a filename was specified also when using force read
Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Peter Stuge <peter@stuge.se> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3647 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
-rw-r--r--util/flashrom/flashrom.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/util/flashrom/flashrom.c b/util/flashrom/flashrom.c
index a6d6e9148c..093f2eac1f 100644
--- a/util/flashrom/flashrom.c
+++ b/util/flashrom/flashrom.c
@@ -449,6 +449,10 @@ int main(int argc, char *argv[])
printf("Run flashrom -L to view the hardware supported in this flashrom version.\n");
exit(1);
}
+ if (!filename) {
+ printf("Error: No filename specified.\n");
+ exit(1);
+ }
size = flashes[0]->total_size * 1024;
buf = (uint8_t *) calloc(size, sizeof(char));