diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2009-10-19 16:16:54 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2009-10-19 16:18:33 +0200 |
commit | 420a3173f0f7d2bd35f32be437e4888a82047560 (patch) | |
tree | 445f3f6a62d1a88af8522696dba1764f27326f46 /common | |
parent | f4ca85a2a3773202f556e19c9227d83508316108 (diff) | |
download | barebox-420a3173f0f7d2bd35f32be437e4888a82047560.tar.gz barebox-420a3173f0f7d2bd35f32be437e4888a82047560.tar.xz |
commands: remove maxargs
No need to check for maximum argument counts. The commands are
safe to be called with more arguments, so lets safe some bytes.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common')
-rw-r--r-- | common/command.c | 6 | ||||
-rw-r--r-- | common/hush.c | 2 |
2 files changed, 0 insertions, 8 deletions
diff --git a/common/command.c b/common/command.c index e6b4aff8b8..f484520572 100644 --- a/common/command.c +++ b/common/command.c @@ -56,7 +56,6 @@ static int do_exit (cmd_tbl_t *cmdtp, int argc, char *argv[]) } U_BOOT_CMD_START(exit) - .maxargs = 2, .cmd = do_exit, .usage = "exit script", U_BOOT_CMD_END @@ -101,11 +100,6 @@ int execute_command(int argc, char **argv) /* Look up command in command table */ if ((cmdtp = find_cmd(argv[0]))) { - /* found - check max args */ - if (argc > cmdtp->maxargs) { - u_boot_cmd_usage(cmdtp); - return -1; - } /* OK - call function to do the command */ ret = cmdtp->cmd(cmdtp, argc, argv); if (ret == COMMAND_ERROR_USAGE) { diff --git a/common/hush.c b/common/hush.c index 70ccd047e3..0e58e99e61 100644 --- a/common/hush.c +++ b/common/hush.c @@ -1594,7 +1594,6 @@ static const __maybe_unused char cmd_sh_help[] = "Execute a shell script\n"; U_BOOT_CMD_START(sh) - .maxargs = CONFIG_MAXARGS, .cmd = do_sh, .usage = "run shell script", U_BOOT_CMD_HELP(cmd_sh_help) @@ -1622,7 +1621,6 @@ static const __maybe_unused char cmd_source_usage[] = "execute shell script in current shell environment"; U_BOOT_CMD_START(source) - .maxargs = CONFIG_MAXARGS, .aliases = source_aliases, .cmd = do_source, .usage = cmd_source_usage, |