It is possible to have autoboot enabled with an empty boot order.
Currently this acts as if autoboot is disabled, but it likely makes more
sense to the user for this to behave as "autoboot any device".
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
int boot_match = autoboot_option_priority(config, opt);
if (boot_match > 0)
return boot_match;
int boot_match = autoboot_option_priority(config, opt);
if (boot_match > 0)
return boot_match;
+ } else {
+ /* If there is no specific boot order, boot any device */
+ return DEFAULT_PRIORITY_LOCAL_FIRST;
}
/* If the option didn't match any entry in the array, it is disabled */
}
/* If the option didn't match any entry in the array, it is disabled */
const struct system_info *sysinfo = screen->cui->sysinfo;
enum net_conf_type net_conf_type;
struct interface_config *iface;
const struct system_info *sysinfo = screen->cui->sysinfo;
enum net_conf_type net_conf_type;
struct interface_config *iface;
- bool allow_write, autoboot;
char *str, *end;
struct config *config;
int i, n_boot_opts, rc;
char *str, *end;
struct config *config;
int i, n_boot_opts, rc;
n_boot_opts = widget_subset_get_order(config, &order,
screen->widgets.boot_order_f);
n_boot_opts = widget_subset_get_order(config, &order,
screen->widgets.boot_order_f);
- autoboot = widget_select_get_value(screen->widgets.autoboot_f);
- config->autoboot_enabled = autoboot && n_boot_opts;
+ config->autoboot_enabled = widget_select_get_value(
+ screen->widgets.autoboot_f);
config->n_autoboot_opts = n_boot_opts;
config->autoboot_opts = talloc_array(config, struct autoboot_option,
config->n_autoboot_opts = n_boot_opts;
config->autoboot_opts = talloc_array(config, struct autoboot_option,