summaryrefslogtreecommitdiffstats
path: root/ui/ncurses/nc-menu.h
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2013-11-17 14:04:08 +1100
committerJeremy Kerr <jk@ozlabs.org>2013-11-22 10:45:54 +0800
commit37c9aee3ffc02a299d94867df9df8132b09fc611 (patch)
treeff87ad3b758f7da2bad7c69b9b8d7113657b9dcb /ui/ncurses/nc-menu.h
parent504b84c7a37ba8656bceb80fa37138751b7a6702 (diff)
downloadtalos-petitboot-37c9aee3ffc02a299d94867df9df8132b09fc611.tar.gz
talos-petitboot-37c9aee3ffc02a299d94867df9df8132b09fc611.zip
ui/ncurses: Make boot editor API consistent with config & sysinfo screens
The boot-editor API is a little more exposed than it needs to be: the boot_editor struct does not need to be available to other files, and the init function and on_exit functions differ from those provided for the config and sysinfo screens. This change unifies the boot_editor API with those for the other screens. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'ui/ncurses/nc-menu.h')
-rw-r--r--ui/ncurses/nc-menu.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/ui/ncurses/nc-menu.h b/ui/ncurses/nc-menu.h
index 693b96c..4639c55 100644
--- a/ui/ncurses/nc-menu.h
+++ b/ui/ncurses/nc-menu.h
@@ -67,6 +67,11 @@ static inline struct pmenu_item *pmenu_item_from_arg(void *arg)
return item;
}
+static inline struct cui_opt_data *cod_from_item(struct pmenu_item *item)
+{
+ return item->data;
+}
+
static inline struct pmenu_item *pmenu_item_init(struct pmenu *menu,
unsigned int index, const char *name)
{
OpenPOWER on IntegriCloud