X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=ui%2Fncurses%2Fps3-main.c;h=f60a05e41a8c842395ae6350b4c86c8930805632;hp=c4a3892887b3f212130b9a630c5aa91b329d451d;hb=2dfbd9811d1e14911a6476850aada94b88a0dbdd;hpb=bf8d7e61a8fbc19be5ea1a73b9eaa30e58453d1f diff --git a/ui/ncurses/ps3-main.c b/ui/ncurses/ps3-main.c index c4a3892..f60a05e 100644 --- a/ui/ncurses/ps3-main.c +++ b/ui/ncurses/ps3-main.c @@ -24,9 +24,9 @@ * ncurses mouse support */ +#if defined(HAVE_CONFIG_H) #include "config.h" - -#define _GNU_SOURCE +#endif #include #include @@ -275,7 +275,7 @@ static int ps3_boot_cb(struct cui *cui, struct cui_opt_data *cod) int altered_args; char *orig_args; - pb_log("%s: %s\n", __func__, cod->name); + pb_debug("%s: %s\n", __func__, cod->name); assert(ps3->cui->current == &ps3->cui->main->scr); @@ -411,7 +411,15 @@ static struct pmenu *ps3_mm_init(struct ps3_cui *ps3_cui) return NULL; } - m->hot_key = ps3_hot_key; + m->n_hot_keys = 2; + m->hot_keys = talloc_array(m, hot_key_fn *, m->n_hot_keys); + if (!m->hot_keys) { + pb_log("%s: failed to allocate hot_keys\n", __func__); + talloc_free(m); + return NULL; + } + m->hot_keys[0] = ps3_hot_key; + m->hot_keys[1] = pmenu_main_hot_keys; m->on_new = cui_item_new; #if defined(DEBUG)