iPXE
|
Menu commands. More...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <getopt.h>
#include <ipxe/menu.h>
#include <ipxe/command.h>
#include <ipxe/parseopt.h>
#include <ipxe/settings.h>
#include <ipxe/features.h>
Go to the source code of this file.
Data Structures | |
struct | menu_options |
"menu" options More... | |
struct | item_options |
"item" options More... | |
struct | choose_options |
"choose" options More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
FEATURE (FEATURE_MISC, "Menu", DHCP_EB_FEATURE_MENU, 1) | |
static int | menu_exec (int argc, char **argv) |
The "menu" command. More... | |
static int | item_exec (int argc, char **argv) |
The "item" command. More... | |
static int | choose_exec (int argc, char **argv) |
The "choose" command. More... | |
Variables | |
static struct option_descriptor | menu_opts [] |
"menu" option list More... | |
static struct command_descriptor | menu_cmd |
"menu" command descriptor More... | |
static struct option_descriptor | item_opts [] |
"item" option list More... | |
static struct command_descriptor | item_cmd |
"item" command descriptor More... | |
static struct option_descriptor | choose_opts [] |
"choose" option list More... | |
static struct command_descriptor | choose_cmd |
"choose" command descriptor More... | |
struct command menu_commands [] | __command |
Menu commands. More... | |
Menu commands.
Definition in file menu_cmd.c.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
FEATURE | ( | FEATURE_MISC | , |
"Menu" | , | ||
DHCP_EB_FEATURE_MENU | , | ||
1 | |||
) |
|
static |
The "menu" command.
argc | Argument count |
argv | Argument list |
rc | Return status code |
Definition at line 73 of file menu_cmd.c.
References concat_args(), create_menu(), destroy_menu(), ENOMEM, free, menu_cmd, optind, opts, parse_options(), rc, and menu::title.
|
static |
The "item" command.
argc | Argument count |
argv | Argument list |
rc | Return status code |
Definition at line 147 of file menu_cmd.c.
References add_menu_item(), concat_args(), ENOMEM, free, item_cmd, menu_item::label, NULL, optind, opts, parse_menu(), parse_options(), rc, and menu_item::text.
|
static |
The "choose" command.
argc | Argument count |
argv | Argument list |
rc | Return status code |
Definition at line 230 of file menu_cmd.c.
References choose_cmd, destroy_menu(), menu_item::label, setting::name, optind, opts, parse_autovivified_setting(), parse_menu(), parse_options(), printf(), rc, show_menu(), storef_setting(), strerror(), and setting::type.
|
static |
"menu" option list
Definition at line 54 of file menu_cmd.c.
|
static |
"menu" command descriptor
Definition at line 62 of file menu_cmd.c.
Referenced by menu_exec().
|
static |
"item" option list
Definition at line 124 of file menu_cmd.c.
|
static |
"item" command descriptor
Definition at line 136 of file menu_cmd.c.
Referenced by item_exec().
|
static |
"choose" option list
Definition at line 208 of file menu_cmd.c.
|
static |
"choose" command descriptor
Definition at line 220 of file menu_cmd.c.
Referenced by choose_exec().
struct command menu_commands [] __command |
Menu commands.
Definition at line 281 of file menu_cmd.c.