ui/ncurses: Keep track of the default boot option
[petitboot] / discover / device-handler.c
index e446cab528fb8d53238a6724a8deddb2dbc744a5..e75f41232db072e2db2a1aae4e6346b3574bdd99 100644 (file)
@@ -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;