55 unsigned int hpos = 0;
57 printf (
"\nAvailable commands:\n\n" );
60 if ( hpos > ( 16 * 4 ) ) {
70 printf (
"\n\nType \"<command> --help\" for further information\n\n" );
90 memset ( &history, 0,
sizeof ( history ) );
struct arbelprm_rc_send_wqe rc
#define PRODUCT_SHORT_NAME
int printf(const char *fmt,...)
Write a formatted string to the console.
int parse_options(int argc, char **argv, struct command_descriptor *cmd, void *opts)
Parse command-line options.
int shell(void)
Start command shell.
#define __unused
Declare a variable or data structure as unused.
Parse command-line options.
static int shell_exec(int argc, char **argv)
"shell" command
static void(* free)(struct refcnt *refcnt))
A readline history buffer.
static struct option_descriptor shell_opts[]
"shell" option list
static struct command_descriptor shell_cmd
"shell" command descriptor
Command line option parsing.
#define for_each_table_entry(pointer, table)
Iterate through all entries within a linker table.
struct command help_command __command
"help" command
int readline_history(const char *prompt, const char *prefill, struct readline_history *history, unsigned long timeout, char **line)
Read line from console (with history)
static const char shell_prompt[]
The shell prompt string.
const char * name
Name of the command.
int shell_stopped(int stop)
Test and consume shell stop state.
void history_free(struct readline_history *history)
Free history buffer.
static int help_exec(int argc __unused, char **argv __unused)
"help" command
Stop processing commands.
A command-line option descriptor.
#define COMMAND_DESC(_struct, _options, _min_args, _max_args, _usage)
Construct command descriptor.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
static union @438 opts
"cert<xxx>" option list
#define NULL
NULL pointer (VOID *)
uint8_t system[ETH_ALEN]
System identifier.
void * memset(void *dest, int character, size_t len) __nonnull