[flashrom] [commit] r1426 - trunk
repository service
svn at flashrom.org
Sat Sep 3 19:15:01 CEST 2011
Author: uwe
Date: Sat Sep 3 19:15:00 2011
New Revision: 1426
URL: http://flashrom.org/trac/flashrom/changeset/1426
Log:
Introduce ERROR_FATAL, abort upon failed chipset enables.
Signed-off-by: Tadas Slotkus <devtadas at gmail.com>
Acked-by: Uwe Hermann <uwe at hermann-uwe.de>
Modified:
trunk/chipset_enable.c
trunk/flash.h
trunk/internal.c
Modified: trunk/chipset_enable.c
==============================================================================
--- trunk/chipset_enable.c Sat Sep 3 13:22:27 2011 (r1425)
+++ trunk/chipset_enable.c Sat Sep 3 19:15:00 2011 (r1426)
@@ -1325,6 +1325,10 @@
msg_pinfo("OK.\n");
else if (ret == ERROR_NONFATAL)
msg_pinfo("PROBLEMS, continuing anyway\n");
+ if (ret == ERROR_FATAL) {
+ msg_perr("FATAL ERROR!\n");
+ return ret;
+ }
}
s = flashbuses_to_text(buses_supported);
Modified: trunk/flash.h
==============================================================================
--- trunk/flash.h Sat Sep 3 13:22:27 2011 (r1425)
+++ trunk/flash.h Sat Sep 3 19:15:00 2011 (r1426)
@@ -224,9 +224,12 @@
#define OK 0
#define NT 1 /* Not tested */
-/* Something happened that shouldn't happen, but we can go on */
+/* Something happened that shouldn't happen, but we can go on. */
#define ERROR_NONFATAL 0x100
+/* Something happened that shouldn't happen, we'll abort. */
+#define ERROR_FATAL -0xee
+
/* cli_output.c */
/* Let gcc and clang check for correct printf-style format strings. */
int print(int type, const char *fmt, ...) __attribute__((format(printf, 2, 3)));
Modified: trunk/internal.c
==============================================================================
--- trunk/internal.c Sat Sep 3 13:22:27 2011 (r1425)
+++ trunk/internal.c Sat Sep 3 19:15:00 2011 (r1426)
@@ -268,7 +268,8 @@
if (ret == -2) {
msg_perr("WARNING: No chipset found. Flash detection "
"will most likely fail.\n");
- }
+ } else if (ret == ERROR_FATAL)
+ return ret;
#if defined(__i386__) || defined(__x86_64__)
/* Probe unconditionally for IT87* LPC->SPI translation and for
More information about the flashrom
mailing list