X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ui%2Fncurses%2Fnc-cui.c;h=4baaec17d52ca4c9e242b45669c7d5b01bdce776;hb=2b41985dde73e71daad90c36fa5d06c199da3ae1;hp=82e534db817e4f5f8e6252b25bb20fe5731d6658;hpb=78c82fbd0a481249de1763b5d43bb9876ea612bd;p=petitboot diff --git a/ui/ncurses/nc-cui.c b/ui/ncurses/nc-cui.c index 82e534d..4baaec1 100644 --- a/ui/ncurses/nc-cui.c +++ b/ui/ncurses/nc-cui.c @@ -16,12 +16,15 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" + #define _GNU_SOURCE #include #include #include #include +#include #include #include "log/log.h" @@ -158,6 +161,7 @@ static void cui_boot_editor_on_exit(struct boot_editor *boot_editor, enum boot_e pb_log("%s: updating opt '%s'\n", __func__, cod->name); pb_log(" image '%s'\n", cod->bd->image); pb_log(" initrd '%s'\n", cod->bd->initrd); + pb_log(" dtb '%s'\n", cod->bd->dtb); pb_log(" args '%s'\n", cod->bd->args); } @@ -375,6 +379,7 @@ static int cui_boot_option_add(struct device *dev, struct boot_option *opt, cod->bd->image = talloc_strdup(cod->bd, opt->boot_image_file); cod->bd->initrd = talloc_strdup(cod->bd, opt->initrd_file); + cod->bd->dtb = talloc_strdup(cod->bd, opt->dtb_file); cod->bd->args = talloc_strdup(cod->bd, opt->boot_args); pmenu_item_setup(cui->main, i, insert_pt, cod->name); @@ -434,9 +439,8 @@ static void cui_device_remove(struct device *dev, void *arg) list_for_each_entry(&dev->boot_options, opt, list) { struct pmenu_item *i = pmenu_item_from_arg(opt->ui_info); - struct cui_opt_data *cod = cod_from_item(i); - assert(pb_protocol_device_cmp(dev, cod->dev)); + assert(pb_protocol_device_cmp(dev, cod_from_item(i)->dev)); pmenu_remove(cui->main, i); } @@ -503,6 +507,8 @@ struct cui *cui_init(void* platform_info, cui->platform_info = platform_info; cui->waitset = waitset_create(cui); + setlocale(LC_ALL, ""); + /* Loop here for scripts that just started the server. */ retry_start: