Commit ad470347 authored by Tadas Slotkus's avatar Tadas Slotkus Committed by Uwe Hermann
Browse files

Introduce ERROR_FATAL, abort upon failed chipset enables


Corresponding to flashrom svn r1426.
Signed-off-by: default avatarTadas Slotkus <devtadas@gmail.com>
Acked-by: default avatarUwe Hermann <uwe@hermann-uwe.de>
parent 3093f8f7
......@@ -1325,6 +1325,10 @@ int chipset_flash_enable(void)
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);
......
......@@ -224,9 +224,12 @@ int write_buf_to_file(unsigned char *buf, unsigned long size, const char *filena
#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)));
......
......@@ -268,7 +268,8 @@ int internal_init(void)
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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment