|
iPXE
|
Non-volatile option commands. More...
#include <stdint.h>#include <stdlib.h>#include <stdio.h>#include <string.h>#include <errno.h>#include <getopt.h>#include <byteswap.h>#include <ipxe/settings.h>#include <ipxe/command.h>#include <ipxe/parseopt.h>#include <readline/readline.h>Go to the source code of this file.
Data Structures | |
| struct | show_options |
| "show" options More... | |
| struct | set_core_options |
| "set", "clear", and "read" options More... | |
| struct | inc_options |
| "inc" options More... | |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| FILE_SECBOOT (PERMITTED) | |
| static int | show_exec (int argc, char **argv) |
| "show" command | |
| static int | set_core_exec (int argc, char **argv, struct command_descriptor *cmd, int(*get_value)(struct named_setting *setting, struct set_core_options *opts, char **args, char **value)) |
| "set", "clear", and "read" command | |
| static int | set_value (struct named_setting *setting __unused, struct set_core_options *opts __unused, char **args, char **value) |
| Get setting value for "set" command. | |
| static int | set_exec (int argc, char **argv) |
| "set" command | |
| static int | clear_value (struct named_setting *setting __unused, struct set_core_options *opts __unused, char **args __unused, char **value) |
| Get setting value for "clear" command. | |
| static int | clear_exec (int argc, char **argv) |
| "clear" command | |
| static int | read_value (struct named_setting *setting, struct set_core_options *opts, char **args __unused, char **value) |
| Get setting value for "read" command. | |
| static int | read_exec (int argc, char **argv) |
| "read" command | |
| static int | inc_exec (int argc, char **argv) |
| "inc" command | |
| COMMAND (show, show_exec) | |
| Non-volatile option commands. | |
| COMMAND (set, set_exec) | |
| COMMAND (clear, clear_exec) | |
| COMMAND (read, read_exec) | |
| COMMAND (inc, inc_exec) | |
Variables | |
| static struct option_descriptor | show_opts [] = {} |
| "show" option list | |
| static struct command_descriptor | show_cmd |
| "show" command descriptor | |
| union { | |
| struct option_descriptor set [0] | |
| struct option_descriptor clear [0] | |
| struct option_descriptor read [1] | |
| } | set_core_opts |
| "set", "clear", and "read" option list | |
| static struct command_descriptor | set_cmd |
| "set" command descriptor | |
| static struct command_descriptor | clear_cmd |
| "clear" command descriptor | |
| static struct command_descriptor | read_cmd |
| "read" command descriptor | |
| static struct option_descriptor | inc_opts [] = {} |
| "inc" option list | |
| static struct command_descriptor | inc_cmd |
| "inc" command descriptor | |
Non-volatile option commands.
Definition in file nvo_cmd.c.
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
| FILE_SECBOOT | ( | PERMITTED | ) |
|
static |
"show" command
| argc | Argument count |
| argv | Argument list |
| rc | Return status code |
Definition at line 62 of file nvo_cmd.c.
References fetchf_setting_copy(), free, len, setting::name, optind, opts, origin, parse_existing_setting(), parse_options(), printf(), rc, setting_name(), show_cmd, strerror(), and value.
Referenced by COMMAND().
|
static |
"set", "clear", and "read" command
| argc | Argument count |
| argv | Argument list |
| cmd | Command descriptor |
| get_value | Method to obtain setting value |
| rc | Return status code |
Definition at line 148 of file nvo_cmd.c.
References cmd, free, setting::name, optind, opts, parse_autovivified_setting(), parse_options(), printf(), rc, storef_setting(), strerror(), setting::type, and value.
Referenced by clear_exec(), read_exec(), and set_exec().
|
static |
Get setting value for "set" command.
| setting | Named setting |
| opts | Options list |
| args | Remaining arguments |
| value | Setting value |
| rc | Return status code |
Definition at line 201 of file nvo_cmd.c.
References __unused, concat_args(), ENOMEM, opts, and value.
Referenced by set_exec().
|
static |
"set" command
| argc | Argument count |
| argv | Argument list |
| rc | Return status code |
Definition at line 219 of file nvo_cmd.c.
References set_cmd, set_core_exec(), and set_value().
Referenced by COMMAND().
|
static |
Get setting value for "clear" command.
| setting | Named setting |
| args | Remaining arguments |
| opts | Options list |
| value | Setting value |
| rc | Return status code |
Definition at line 232 of file nvo_cmd.c.
References __unused, NULL, opts, and value.
Referenced by clear_exec().
|
static |
"clear" command
| argc | Argument count |
| argv | Argument list |
| rc | Return status code |
Definition at line 247 of file nvo_cmd.c.
References clear_cmd, clear_value(), and set_core_exec().
Referenced by COMMAND().
|
static |
Get setting value for "read" command.
| setting | Named setting |
| args | Remaining arguments |
| opts | Options list |
| value | Setting value |
| rc | Return status code |
Definition at line 260 of file nvo_cmd.c.
References __unused, fetchf_setting_copy(), free, NULL, opts, rc, and value.
Referenced by read_exec().
|
static |
"read" command
| argc | Argument count |
| argv | Argument list |
| rc | Return status code |
Definition at line 289 of file nvo_cmd.c.
References read_cmd, read_value(), and set_core_exec().
Referenced by COMMAND().
|
static |
"inc" command
| argc | Argument count |
| argv | Argument list |
| rc | Return status code |
Definition at line 311 of file nvo_cmd.c.
References fetchn_setting(), inc_cmd, setting::name, NULL, optind, opts, parse_existing_setting(), parse_integer(), parse_options(), printf(), rc, storen_setting(), strerror(), setting::type, and value.
Referenced by COMMAND().
| COMMAND | ( | show | , |
| show_exec | ) |
Non-volatile option commands.
References show_exec().
References set, and set_exec().
| COMMAND | ( | clear | , |
| clear_exec | ) |
References clear, and clear_exec().
References read, and read_exec().
| COMMAND | ( | inc | , |
| inc_exec | ) |
References inc_exec().
|
static |
|
static |
"show" command descriptor
Definition at line 52 of file nvo_cmd.c.
Referenced by show_exec().
| fd_set * set |
Definition at line 112 of file nvo_cmd.c.
Referenced by __attribute__(), ath5k_hw_rfb_op(), ath9k_hw_get_txq_props(), ath9k_hw_set_operating_mode(), ath9k_hw_setrxabort(), ath9k_reg_rmw(), COMMAND(), igbvf_vfta_set_vf(), net80211_set_state(), and tg3_phy_auxctl_write().
| struct option_descriptor clear[0] |
Definition at line 114 of file nvo_cmd.c.
Referenced by b44_wait_bit(), COMMAND(), and net80211_set_state().
| struct option_descriptor read[1] |
Definition at line 116 of file nvo_cmd.c.
Referenced by ar9300_check_eeprom_header(), ar9300_eeprom_restore_internal(), COMMAND(), efi_null_snp_nvdata(), efi_snp_nvdata(), ice_admin_mac_read(), int22(), intelxl_admin_mac_read(), linda_ib_epb_ram_xfer(), mii_bit_xfer(), mlx_pci_config(), mlx_pci_config_byte(), mlx_pci_config_dword(), mlx_pci_config_word(), and pxenv_file_read().
| union { ... } set_core_opts |
"set", "clear", and "read" option list
|
static |
"set" command descriptor
Definition at line 125 of file nvo_cmd.c.
Referenced by set_exec().
|
static |
"clear" command descriptor
Definition at line 130 of file nvo_cmd.c.
Referenced by clear_exec().
|
static |
"read" command descriptor
Definition at line 135 of file nvo_cmd.c.
Referenced by eeprom_read(), falcon_spi_rw(), mdio_read(), read_eeprom(), read_eeprom(), read_eeprom(), read_exec(), and sis900_read_eeprom().
|
static |
|
static |
"inc" command descriptor
Definition at line 300 of file nvo_cmd.c.
Referenced by inc_exec().