summaryrefslogtreecommitdiff
path: root/sys/lib/libsa
diff options
context:
space:
mode:
authormlelstv <mlelstv@NetBSD.org>2021-05-30 05:59:22 +0000
committermlelstv <mlelstv@NetBSD.org>2021-05-30 05:59:22 +0000
commitfc6bcace9a5f4e58ff225239f80868ea27d75d15 (patch)
tree2318d02014d03404a4d175f19c41417c94338346 /sys/lib/libsa
parent3e45a668f9f951e16109c83ec2f6cfe17d837622 (diff)
Add "root" command to provide a BTINFO_ROOTDEVICE parameter.
Diffstat (limited to 'sys/lib/libsa')
-rw-r--r--sys/lib/libsa/bootcfg.c5
-rw-r--r--sys/lib/libsa/bootcfg.h3
2 files changed, 6 insertions, 2 deletions
diff --git a/sys/lib/libsa/bootcfg.c b/sys/lib/libsa/bootcfg.c
index b7e82a12c79..a0e7c9635c2 100644
--- a/sys/lib/libsa/bootcfg.c
+++ b/sys/lib/libsa/bootcfg.c
@@ -1,4 +1,4 @@
-/* $NetBSD: bootcfg.c,v 1.5 2020/06/27 17:22:12 jmcneill Exp $ */
+/* $NetBSD: bootcfg.c,v 1.6 2021/05/30 05:59:23 mlelstv Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -80,6 +80,7 @@ bootcfg_do_noop(const char *cmd, char *arg)
* timeout: Timeout in seconds (overrides that set by installboot)
* default: the default menu option to use if Return is pressed
* consdev: the console device to use
+ * root: the root device to use
* format: how menu choices are displayed: (a)utomatic, (n)umbers or (l)etters
* clear: whether to clear the screen or not
*
@@ -222,6 +223,8 @@ perform_bootcfg(const char *conf, bootcfg_command command, const off_t maxsz)
bootcfg_info.def = atoi(value) - 1;
} else if (!strncmp(key, "consdev", 7)) {
bootcfg_info.consdev = value;
+ } else if (!strncmp(key, "root", 4)) {
+ bootcfg_info.root = value;
} else if (!strncmp(key, BOOTCFG_CMD_LOAD, 4)) {
command(BOOTCFG_CMD_LOAD, value);
} else if (!strncmp(key, "format", 6)) {
diff --git a/sys/lib/libsa/bootcfg.h b/sys/lib/libsa/bootcfg.h
index d692a34ae90..27993da4eaf 100644
--- a/sys/lib/libsa/bootcfg.h
+++ b/sys/lib/libsa/bootcfg.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bootcfg.h,v 1.3 2019/03/31 20:08:45 christos Exp $ */
+/* $NetBSD: bootcfg.h,v 1.4 2021/05/30 05:59:23 mlelstv Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -42,6 +42,7 @@ struct bootcfg_def {
char *banner[BOOTCFG_MAXBANNER]; /* Banner text */
char *command[BOOTCFG_MAXMENU]; /* Menu commands per entry*/
char *consdev; /* Console device */
+ char *root; /* Root specification */
int def; /* Default menu option */
char *desc[BOOTCFG_MAXMENU]; /* Menu text per entry */
int nummenu; /* Number of menu items */