mirror of
https://review.coreboot.org/flashrom.git
synced 2025-04-27 23:22:37 +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:
parent
9a37ba6e9c
commit
0a05d67bab
@ -303,7 +303,8 @@ int main(int argc, char *argv[])
|
|||||||
break;
|
break;
|
||||||
case 'l':
|
case 'l':
|
||||||
tempstr=strdup(optarg);
|
tempstr=strdup(optarg);
|
||||||
read_romlayout(tempstr);
|
if (read_romlayout(tempstr))
|
||||||
|
exit(1);
|
||||||
break;
|
break;
|
||||||
case 'i':
|
case 'i':
|
||||||
tempstr=strdup(optarg);
|
tempstr=strdup(optarg);
|
||||||
|
3
layout.c
3
layout.c
@ -106,7 +106,8 @@ int read_romlayout(char *name)
|
|||||||
romlayout=fopen (name, "r");
|
romlayout=fopen (name, "r");
|
||||||
|
|
||||||
if(!romlayout) {
|
if(!romlayout) {
|
||||||
printf("Error while opening rom layout (%s).\n", name);
|
fprintf(stderr, "ERROR: Could not open rom layout (%s).\n",
|
||||||
|
name);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user