From 87e01f28ccc85474e18e1218c9d84f98e2e8977d Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Sat, 17 Oct 2009 12:44:19 +0200 Subject: commands: return COMMAND_ERROR_USAGE instead of calling u_boot_cmd_usage in each command to safe space. Signed-off-by: Sascha Hauer --- commands/net.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'commands/net.c') diff --git a/commands/net.c b/commands/net.c index f25a35d2f1..f059e7284b 100644 --- a/commands/net.c +++ b/commands/net.c @@ -171,10 +171,8 @@ netboot_common (proto_t proto, cmd_tbl_t *cmdtp, int argc, char *argv[]) char *localfile; char *remotefile; - if (argc < 2) { - printf ("Usage:\n%s\n", cmdtp->usage); - return 1; - } + if (argc < 2) + return COMMAND_ERROR_USAGE; remotefile = argv[1]; @@ -275,10 +273,8 @@ static int do_ethact (cmd_tbl_t *cmdtp, int argc, char *argv[]) return 0; } - if (argc != 2) { - u_boot_cmd_usage(cmdtp); - return 1; - } + if (argc != 2) + return COMMAND_ERROR_USAGE; edev = eth_get_byname(argv[1]); if (edev) -- cgit v1.2.3