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

instead of stdout (trivial)

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2610 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Stefan Reinauer 2007-04-14 16:32:59 +00:00 committed by Stefan Reinauer
parent 0594222ece
commit f1291cfdfc
2 changed files with 4 additions and 2 deletions

View File

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

View File

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