diff options
author | Sascha Hauer <sha@pengutronix.de> | 2009-10-17 12:44:19 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2009-10-19 10:18:52 +0200 |
commit | 87e01f28ccc85474e18e1218c9d84f98e2e8977d (patch) | |
tree | c1918930683559d745dcc955d9572b5f568a02f5 /commands/cp.c | |
parent | 0ecf7f1aeb906e3b30500080fbc4e1d1b770f1a2 (diff) | |
download | barebox-87e01f28ccc85474e18e1218c9d84f98e2e8977d.tar.gz barebox-87e01f28ccc85474e18e1218c9d84f98e2e8977d.tar.xz |
commands: return COMMAND_ERROR_USAGE
instead of calling u_boot_cmd_usage in each command to safe
space.
Signed-off-by: Sascha Hauer <sha@pengutronix.de>
Diffstat (limited to 'commands/cp.c')
-rw-r--r-- | commands/cp.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/commands/cp.c b/commands/cp.c index 0a90c163b0..0fe3242e0c 100644 --- a/commands/cp.c +++ b/commands/cp.c @@ -44,10 +44,8 @@ static int do_cp ( cmd_tbl_t *cmdtp, int argc, char *argv[]) int last_is_dir = 0; int i; - if (argc < 3) { - u_boot_cmd_usage(cmdtp); - return 1; - } + if (argc < 3) + return COMMAND_ERROR_USAGE; if (!stat(argv[argc - 1], &statbuf)) { if (S_ISDIR(statbuf.st_mode)) |