[U-Boot] [PATCH 1/2] Create a single cmd_call() function to handle command execution

Mike Frysinger vapier at gentoo.org
Tue Oct 25 15:57:53 CEST 2011


On Mon, Oct 24, 2011 at 23:52, Simon Glass wrote:
> +int cmd_call(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
> +{
> +       int result;
> +
> +       result = (cmdtp->cmd)(cmdtp, flag, argc, argv);
> +       if (result)
> +               debug("Command failed, result=%d", result);
> +       return result;
> +}

i don't think this goes for enough.  it should integrate the "if (argc
> cmdtp->maxargs) return cmd_usage(cmdtp);".

and perhaps even the find_cmd(argv[0]) lookup ...
-mike


More information about the U-Boot mailing list