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
This commit is contained in:
Peter Stuge 2008-10-10 20:43:17 +00:00
parent 32965d8dbb
commit 4e40e46d49
1 changed files with 4 additions and 0 deletions

View File

@ -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));