X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=ui%2Fncurses%2Fnc-config.c;h=5c0f23bd88d284ff962ed70aa4571c19d01bb215;hp=58bae290c23d03686b27d116a70a6d4eb1c7d577;hb=fb8dbd274b4b2c4df52d09d2fe303ccdacdf546b;hpb=af51ccb8b8664eb9462aa4a6e7e2a9f52430647f diff --git a/ui/ncurses/nc-config.c b/ui/ncurses/nc-config.c index 58bae29..5c0f23b 100644 --- a/ui/ncurses/nc-config.c +++ b/ui/ncurses/nc-config.c @@ -203,7 +203,7 @@ static int screen_process_form(struct config_screen *screen) const struct system_info *sysinfo = screen->cui->sysinfo; enum net_conf_type net_conf_type; struct interface_config *iface; - bool allow_write, autoboot; + bool allow_write; char *str, *end; struct config *config; int i, n_boot_opts, rc; @@ -218,8 +218,8 @@ static int screen_process_form(struct config_screen *screen) 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, @@ -1042,6 +1042,7 @@ static void config_screen_setup_widgets(struct config_screen *screen, screen->widgets.url_l = widget_new_label(set, 0, 0, _("URL:")); screen->widgets.url_f = widget_new_textbox(set, 0, 0, 32, url); + widget_textbox_set_validator_url(screen->widgets.url_f); screen->widgets.url_help_l = widget_new_label(set, 0, 0, _("(eg. tftp://)"));