|
| | FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) |
| |
| | FEATURE (FEATURE_MISC, "Menu", DHCP_EB_FEATURE_MENU, 1) |
| |
| static int | dynui_exec (int argc, char **argv) |
| | The "dynui" 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...
|
| |
| static int | present_exec (int argc, char **argv) |
| | The "present" command. More...
|
| |
| | COMMAND (menu, dynui_exec) |
| | Dynamic user interface commands. More...
|
| |
| | COMMAND (form, dynui_exec) |
| |
| | COMMAND (item, item_exec) |
| |
| | COMMAND (choose, choose_exec) |
| |
| | COMMAND (present, present_exec) |
| |
Dynamic user interface commands.
Definition in file dynui_cmd.c.
| static int item_exec |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
|
static |
The "item" command.
- Parameters
-
| argc | Argument count |
| argv | Argument list |
- Return values
-
Definition at line 153 of file dynui_cmd.c.
157 unsigned int flags = 0;
164 goto err_parse_options;
181 goto err_parse_dynui;
184 if (
opts.is_default )
186 if (
opts.is_secret )
192 goto err_add_dynui_item;
struct arbelprm_rc_send_wqe rc
A dynamic user interface item.
int optind
Current option index.
int parse_dynui(char *text, struct dynamic_ui **dynui)
Parse dynamic user interface name.
int parse_options(int argc, char **argv, struct command_descriptor *cmd, void *opts)
Parse command-line options.
static struct command_descriptor item_cmd
"item" command descriptor
#define ENOMEM
Not enough space.
char * concat_args(char **args)
Concatenate arguments.
struct dynamic_item * add_dynui_item(struct dynamic_ui *dynui, const char *name, const char *text, unsigned int flags, int shortcut)
Add dynamic user interface item.
static void(* free)(struct refcnt *refcnt))
A dynamic user interface.
#define DYNUI_DEFAULT
Dynamic user interface item is default selection.
static union @447 opts
"cert<xxx>" option list
#define NULL
NULL pointer (VOID *)
#define DYNUI_SECRET
Dynamic user interface item represents a secret.
References add_dynui_item(), concat_args(), DYNUI_DEFAULT, DYNUI_SECRET, ENOMEM, flags, free, item_cmd, name, NULL, optind, opts, parse_dynui(), parse_options(), rc, and dynamic_item::text.
| static int choose_exec |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
|
static |
The "choose" command.
- Parameters
-
| argc | Argument count |
| argv | Argument list |
- Return values
-
Definition at line 245 of file dynui_cmd.c.
254 goto err_parse_options;
259 goto err_parse_setting;
263 goto err_parse_dynui;
267 opts.select, &item ) ) != 0 )
276 item->
name ) ) != 0 ) {
277 printf (
"Could not store \"%s\": %s\n",
struct arbelprm_rc_send_wqe rc
A dynamic user interface item.
int printf(const char *fmt,...)
Write a formatted string to the console.
int optind
Current option index.
int parse_dynui(char *text, struct dynamic_ui **dynui)
Parse dynamic user interface name.
int parse_autovivified_setting(char *text, struct named_setting *setting)
Parse and autovivify setting name.
int parse_options(int argc, char **argv, struct command_descriptor *cmd, void *opts)
Parse command-line options.
const struct setting_type * type
Setting type.
int storef_setting(struct settings *settings, const struct setting *setting, const char *value)
Store formatted value of setting.
char * strerror(int errno)
Retrieve string representation of error number.
static struct command_descriptor choose_cmd
"choose" command descriptor
A dynamic user interface.
static union @447 opts
"cert<xxx>" option list
void destroy_dynui(struct dynamic_ui *dynui)
Destroy dynamic user interface.
References choose_cmd, destroy_dynui(), setting::name, dynamic_item::name, optind, opts, parse_autovivified_setting(), parse_dynui(), parse_options(), printf(), rc, show_menu(), storef_setting(), strerror(), and setting::type.