Home | History | Annotate | Download | only in mmc-utils

Lines Matching defs:Command

33 struct Command {
34 CommandFunction func; /* function which implements the command */
49 static struct Command commands[] = {
123 "Send Sanitize command to the <device>.\nThis will delete the unmapped memory region of the device.",
193 static void print_help(char *programname, struct Command *cmd, int helptype)
217 struct Command *cp;
224 printf("\n\t%s <cmd> --help\n\t\tShow detailed help for a command or subset of commands.\n",np);
251 This function checks if the passed command is ambiguous
253 static int check_ambiguity(struct Command *cmd, char **argv){
255 struct Command *cp;
283 fprintf(stderr, "ERROR: in command '");
294 * This function, compacts the program name and the command in the first
297 static int prepare_args(int *ac, char ***av, char *prgname, struct Command *cmd ){
329 - verify that a command is not ambiguous, otherwise show which
330 part of the command is ambiguous
331 - if after a (even partial) command there is '--help' show detailed help
333 - if the command doesn't match show an error
334 - finally, if a command matches, they return which command matched and
338 of uncorrect command; >0 in case of matching commands
340 *nargs_ is the number of the arguments after the command (output)
341 **cmd_ is the invoked command (output)
342 ***args_ are the arguments after the command
349 struct Command *cp;
350 struct Command *matchcmd=0;
411 fprintf( stderr, "ERROR: unknown command '%s'\n",argv[1]);
447 /* error or no command to parse*/