mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 16:52:14 +02:00
Convert cmd_usage() calls in common to use a return value
Change all files in common/ to use CMD_RET_USAGE instead of calling cmd_usage() directly. I'm not completely sure about this patch since the code since impact is small (100 byte or so on ARM) and it might need splitting into smaller patches. But for now here it is. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
committed by
Wolfgang Denk
parent
9d12d5d41d
commit
4c12eeb8b5
@@ -231,7 +231,7 @@ static int netboot_common(enum proto_t proto, cmd_tbl_t *cmdtp, int argc,
|
||||
#endif
|
||||
default:
|
||||
show_boot_progress (-80);
|
||||
return cmd_usage(cmdtp);
|
||||
return CMD_RET_USAGE;
|
||||
}
|
||||
|
||||
show_boot_progress (80);
|
||||
@@ -271,7 +271,7 @@ int do_ping (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
||||
|
||||
NetPingIP = string_to_ip(argv[1]);
|
||||
if (NetPingIP == 0)
|
||||
return cmd_usage(cmdtp);
|
||||
return CMD_RET_USAGE;
|
||||
|
||||
if (NetLoop(PING) < 0) {
|
||||
printf("ping failed; host %s is not alive\n", argv[1]);
|
||||
@@ -377,7 +377,7 @@ U_BOOT_CMD(
|
||||
int do_dns(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
||||
{
|
||||
if (argc == 1)
|
||||
return cmd_usage(cmdtp);
|
||||
return CMD_RET_USAGE;
|
||||
|
||||
/*
|
||||
* We should check for a valid hostname:
|
||||
|
Reference in New Issue
Block a user