X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ui%2Fncurses%2Fnc-config.c;h=5c0f23bd88d284ff962ed70aa4571c19d01bb215;hb=761398a5dce21926a68e016627825b9010edff7e;hp=337d8a4fdc11eed258645fca77252dcab7d6ccdf;hpb=c30d76aabf5f548556ea25b1fac5eb707a9f737a;p=petitboot diff --git a/ui/ncurses/nc-config.c b/ui/ncurses/nc-config.c index 337d8a4..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, @@ -946,7 +946,7 @@ static void config_screen_setup_widgets(struct config_screen *screen, label = talloc_asprintf(screen, _("%s IPMI boot option: %s"), config->ipmi_bootdev_persistent ? - "Persistent" : "Temporary", + _("Persistent") : _("Temporary"), ipmi_bootdev_display_name(config->ipmi_bootdev)); screen->widgets.ipmi_type_l = widget_new_label(set, 0, 0, label); @@ -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://)"));