summaryrefslogtreecommitdiffstats
path: root/sys/boot/common/bootstrap.h
diff options
context:
space:
mode:
authorsmh <smh@FreeBSD.org>2016-01-13 18:33:12 +0000
committersmh <smh@FreeBSD.org>2016-01-13 18:33:12 +0000
commit06809ba3458e8ab8737618399e05149d707fda2c (patch)
treeb8b713794f80f5c7b26f867f1ac53d5a8bc27628 /sys/boot/common/bootstrap.h
parentd11935e3039113a1842b7e8bdfc5e51c117e9366 (diff)
downloadFreeBSD-src-06809ba3458e8ab8737618399e05149d707fda2c.zip
FreeBSD-src-06809ba3458e8ab8737618399e05149d707fda2c.tar.gz
Improve non-interactive forth cmd error reporting
Non-interactive forth command errors where silent even for critical issues e.g. failing to load a required kernel module or mfs_root. This resulted in later unexplained and hard to trace errors such as mount root failures. This introduces additional command return codes that are treated appropriately by the non-interactive command processor (bf_command). * CMD_CRIT = print error * CMD_FATAL = panic Also fix minor style(9) issues with command_load return codes. MFC after: 2 weeks X-MFC-With: r293268 Sponsored by: Multiplay
Diffstat (limited to 'sys/boot/common/bootstrap.h')
-rw-r--r--sys/boot/common/bootstrap.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/boot/common/bootstrap.h b/sys/boot/common/bootstrap.h
index 5904c82..78d742d 100644
--- a/sys/boot/common/bootstrap.h
+++ b/sys/boot/common/bootstrap.h
@@ -56,7 +56,10 @@ typedef int (bootblk_cmd_t)(int argc, char *argv[]);
extern char *command_errmsg;
extern char command_errbuf[]; /* XXX blah, length */
#define CMD_OK 0
-#define CMD_ERROR 1
+#define CMD_WARN 1
+#define CMD_ERROR 2
+#define CMD_CRIT 3
+#define CMD_FATAL 4
/* interp.c */
void interact(const char *rc);
OpenPOWER on IntegriCloud