]>
cloudbase.mooo.com Git - z180-stamp.git/blob - avr/cli.h
5 * Go into the command loop
7 * This will return if we get a timeout waiting for a command, but only for
8 * the simple parser (not hush). See CONFIG_BOOT_RETRY_TIME.
13 * cli_simple_run_command() - Execute a command with the simple CLI
15 * @cmd: String containing the command to execute
16 * @flag Flag value - see CMD_FLAG_...
17 * @return 1 - command executed, repeatable
18 * 0 - command executed but not repeatable, interrupted commands are
19 * always considered not repeatable
20 * -1 - not executed (unrecognized, bootd recursion or too many args)
21 * (If cmd is NULL or "" or longer than CONFIG_SYS_CBSIZE-1 it is
22 * considered unrecognized)
24 //int cli_simple_run_command(const char *cmd, int flag);
27 * cli_simple_run_command_list() - Execute a list of command
29 * The commands should be separated by ; or \n and will be executed
30 * by the built-in parser.
32 * This function cannot take a const char * for the command, since if it
33 * finds newlines in the string, it replaces them with \0.
35 * @param cmd String containing list of commands
36 * @param flag Execution flags (CMD_FLAG_...)
37 * @return 0 on success, or != 0 on error.
39 //int cli_simple_run_command_list(char *cmd, int flag);
42 * parse_line() - split a command line down into separate arguments
44 * The argv[] array is filled with pointers into @line, and each argument
45 * is terminated by \0 (i.e. @line is changed in the process unless there
46 * is only one argument).
48 * #argv is terminated by a NULL after the last argument pointer.
50 * At most CONFIG_SYS_MAXARGS arguments are permited - if there are more
51 * than that then an error is printed, and this function returns
52 * CONFIG_SYS_MAXARGS, with argv[] set up to that point.
54 * @line: Command line to parse
55 * @args: Array to hold arguments
56 * @return number of arguments
58 //int cli_simple_parse_line(char *line, char *argv[]);
60 int run_command_list(const char *cmd
, int len
);