|
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) |
|
static int | show_exec (int argc, char **argv) |
| "show" command More...
|
|
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 More...
|
|
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. More...
|
|
static int | set_exec (int argc, char **argv) |
| "set" command More...
|
|
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. More...
|
|
static int | clear_exec (int argc, char **argv) |
| "clear" command More...
|
|
static int | read_value (struct named_setting *setting, struct set_core_options *opts, char **args __unused, char **value) |
| Get setting value for "read" command. More...
|
|
static int | read_exec (int argc, char **argv) |
| "read" command More...
|
|
static int | inc_exec (int argc, char **argv) |
| "inc" command More...
|
|
Non-volatile option commands.
Definition in file nvo_cmd.c.
static int show_exec |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
|
static |
"show" command
- Parameters
-
argc | Argument count |
argv | Argument list |
- Return values
-
Definition at line 61 of file nvo_cmd.c.
73 goto err_parse_options;
77 goto err_parse_setting;
83 printf (
"Could not find \"%s\": %s\n",
struct arbelprm_rc_send_wqe rc
int printf(const char *fmt,...)
Write a formatted string to the console.
int optind
Current option index.
int fetchf_setting_copy(struct settings *settings, const struct setting *setting, struct settings **origin, struct setting *fetched, char **value)
Fetch copy of formatted value of setting.
int parse_options(int argc, char **argv, struct command_descriptor *cmd, void *opts)
Parse command-line options.
pseudo_bit_t value[0x00020]
int parse_existing_setting(char *text, struct named_setting *setting)
Parse existing setting name.
char * strerror(int errno)
Retrieve string representation of error number.
static void(* free)(struct refcnt *refcnt))
static struct command_descriptor show_cmd
"show" command descriptor
static union @438 opts
"cert<xxx>" option list
int setting_name(struct settings *settings, const struct setting *setting, char *buf, size_t len)
Return full setting name.
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.
"set", "clear", and "read" command
- Parameters
-
argc | Argument count |
argv | Argument list |
cmd | Command descriptor |
get_value | Method to obtain setting value |
- Return values
-
Definition at line 147 of file nvo_cmd.c.
159 goto err_parse_options;
164 goto err_parse_setting;
178 printf (
"Could not store \"%s\": %s\n",
"set", "clear", and "read" options
struct arbelprm_rc_send_wqe rc
int printf(const char *fmt,...)
Write a formatted string to the console.
int optind
Current option index.
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.
pseudo_bit_t value[0x00020]
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 void(* free)(struct refcnt *refcnt))
static union @438 opts
"cert<xxx>" option list
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 int inc_exec |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
|
static |
"inc" command
- Parameters
-
argc | Argument count |
argv | Argument list |
- Return values
-
Definition at line 310 of file nvo_cmd.c.
313 unsigned int increment = 1;
319 goto err_parse_options;
323 goto err_parse_setting;
326 if ( ( (
optind + 1 ) < argc ) &&
328 goto err_parse_increment;
346 printf (
"Could not store \"%s\": %s\n",
int parse_integer(char *text, unsigned int *value)
Parse integer value.
struct arbelprm_rc_send_wqe rc
int printf(const char *fmt,...)
Write a formatted string to the console.
int optind
Current option index.
int storen_setting(struct settings *settings, const struct setting *setting, unsigned long value)
Store numeric value of setting.
int parse_options(int argc, char **argv, struct command_descriptor *cmd, void *opts)
Parse command-line options.
pseudo_bit_t value[0x00020]
const struct setting_type * type
Setting type.
int parse_existing_setting(char *text, struct named_setting *setting)
Parse existing setting name.
int fetchn_setting(struct settings *settings, const struct setting *setting, struct settings **origin, struct setting *fetched, unsigned long *value)
Fetch numeric value of setting.
char * strerror(int errno)
Retrieve string representation of error number.
static union @438 opts
"cert<xxx>" option list
static struct command_descriptor inc_cmd
"inc" command descriptor
#define NULL
NULL pointer (VOID *)
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.