- if (!m) {
- pb_log("%s: failed\n", __func__);
- return NULL;
- }
-
- m->on_open = cui_on_open;
-
- m->scr.frame.title = talloc_strdup(m, "Petitboot");
- m->scr.frame.help = talloc_strdup(m,
- "ESC=exit, Enter=accept, e=edit, o=open");
- m->scr.frame.status = talloc_strdup(m, "Welcome to Petitboot");
-
- i = pmenu_item_init(m, 0, "Exit to Shell");
- i->on_execute = pmenu_exit_cb;
-
- result = pmenu_setup(m);
-
- if (result) {
- pb_log("%s:%d: pmenu_setup failed: %s\n", __func__, __LINE__,
- strerror(errno));
- goto fail_setup;
- }
-
- menu_opts_off(m->ncm, O_SHOWDESC);
- set_menu_mark(m->ncm, " *");
- set_current_item(m->ncm, i->nci);
-
- return m;
-
-fail_setup:
- talloc_free(m);
- return NULL;
-}
-
-static struct pb_cui pb;