1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-26 22:52:34 +02:00

Exit on return code of read_layout and print error message to stderr instead of stdout

Corresponding to flashrom svn r104 and coreboot v2 svn r2610.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
This commit is contained in:
Stefan Reinauer 2007-04-14 16:32:59 +00:00 committed by Stefan Reinauer
parent 9a37ba6e9c
commit 0a05d67bab
2 changed files with 4 additions and 2 deletions

View File

@ -303,7 +303,8 @@ int main(int argc, char *argv[])
break;
case 'l':
tempstr=strdup(optarg);
read_romlayout(tempstr);
if (read_romlayout(tempstr))
exit(1);
break;
case 'i':
tempstr=strdup(optarg);

View File

@ -106,7 +106,8 @@ int read_romlayout(char *name)
romlayout=fopen (name, "r");
if(!romlayout) {
printf("Error while opening rom layout (%s).\n", name);
fprintf(stderr, "ERROR: Could not open rom layout (%s).\n",
name);
return -1;
}