summaryrefslogtreecommitdiffstats
path: root/discover/device-handler.c
diff options
context:
space:
mode:
authorSamuel Mendoza-Jonas <sam@mendozajonas.com>2018-06-28 14:45:19 +1000
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>2018-12-03 14:48:41 +1100
commit87017f0478536fcb927010618be483a5efe9260c (patch)
tree27611e71b2b07574be22487e3a45d81f497db733 /discover/device-handler.c
parent07f6db7fc29a93fae3213af18371cccb17e0276a (diff)
downloadtalos-petitboot-87017f0478536fcb927010618be483a5efe9260c.tar.gz
talos-petitboot-87017f0478536fcb927010618be483a5efe9260c.zip
ui/ncurses: Keep track of the default boot option
Keep track of the default boot option, and prefix its display name with a '(*)' to point it out to the user. This avoids having to authenticate with pb-discover even if only booting the default option. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Diffstat (limited to 'discover/device-handler.c')
-rw-r--r--discover/device-handler.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/discover/device-handler.c b/discover/device-handler.c
index e446cab..e75f412 100644
--- a/discover/device-handler.c
+++ b/discover/device-handler.c
@@ -930,6 +930,10 @@ static void set_default(struct device_handler *handler,
return;
}
+ if (handler->default_boot_option)
+ handler->default_boot_option->option->is_autoboot_default = false;
+ opt->option->is_autoboot_default = true;
+
handler->sec_to_boot = config_get()->autoboot_timeout_sec;
handler->default_boot_option = opt;
handler->default_boot_option_priority = new_prio;
OpenPOWER on IntegriCloud