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>
diff --git a/flashrom.c b/flashrom.c
index fddefea..04c8600 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -303,7 +303,8 @@
 			break;
 		case 'l':
 			tempstr=strdup(optarg);
-			read_romlayout(tempstr);
+			if (read_romlayout(tempstr))
+				exit(1);
 			break;
 		case 'i':
 			tempstr=strdup(optarg);
diff --git a/layout.c b/layout.c
index 5478782..8ba2e41 100644
--- a/layout.c
+++ b/layout.c
@@ -106,7 +106,8 @@
 	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;
 	}