diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2013-11-17 14:04:08 +1100 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2013-11-22 10:45:54 +0800 |
commit | 37c9aee3ffc02a299d94867df9df8132b09fc611 (patch) | |
tree | ff87ad3b758f7da2bad7c69b9b8d7113657b9dcb /ui/ncurses/nc-menu.h | |
parent | 504b84c7a37ba8656bceb80fa37138751b7a6702 (diff) | |
download | talos-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.h | 5 |
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) { |