summaryrefslogtreecommitdiffstats
path: root/flashrom.c
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
commit23dc1df565e66bd31813c4063e75df015d630e75 (patch)
treeb0fbf43fd103eae5fe2bb35e505952e6ab21cce6 /flashrom.c
parentcbfed288803019bba1901cf2fbeac2d9222bd761 (diff)
downloadast2050-flashrom-23dc1df565e66bd31813c4063e75df015d630e75.zip
ast2050-flashrom-23dc1df565e66bd31813c4063e75df015d630e75.tar.gz
Check that a filename was specified also when using force read
Corresponding to flashrom svn r322 and coreboot v2 svn r3647. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Peter Stuge <peter@stuge.se>
Diffstat (limited to 'flashrom.c')
-rw-r--r--flashrom.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/flashrom.c b/flashrom.c
index a6d6e91..093f2ea 100644
--- a/flashrom.c
+++ b/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));
OpenPOWER on IntegriCloud