[U-Boot] [PATCH] mflash: use common cmd_usage function

Signed-off-by: Mike Frysinger vapier@gentoo.org --- note: i have no target that uses it, so i havent compile tested this. but the change is straight forward enough ...
common/cmd_mgdisk.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/common/cmd_mgdisk.c b/common/cmd_mgdisk.c index 3ba62f6..03bed88 100644 --- a/common/cmd_mgdisk.c +++ b/common/cmd_mgdisk.c @@ -54,7 +54,7 @@ int do_mg_disk_cmd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return 1; break; default: - printf("Usage:\n%s\n", cmdtp->usage); + cmd_usage(cmdtp); return 1; } return 0;

Hi Mike,
Signed-off-by: Mike Frysinger vapier@gentoo.org
note: i have no target that uses it, so i havent compile tested this. but the change is straight forward enough ...
common/cmd_mgdisk.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/common/cmd_mgdisk.c b/common/cmd_mgdisk.c index 3ba62f6..03bed88 100644 --- a/common/cmd_mgdisk.c +++ b/common/cmd_mgdisk.c @@ -54,7 +54,7 @@ int do_mg_disk_cmd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return 1; break; default:
printf("Usage:\n%s\n", cmdtp->usage);
return 1; } return 0;cmd_usage(cmdtp);
With commit 47e26b1bf91ddef69f4a3892815c857db094cef9 [cmd_usage(): simplify return code handling] I suppose this should be directly changed to a return cmd_usage.
This applies to one other patch you sent.
Cheers Detlev

On Thursday, July 29, 2010 07:28:13 Detlev Zundel wrote:
--- a/common/cmd_mgdisk.c +++ b/common/cmd_mgdisk.c @@ -54,7 +54,7 @@ int do_mg_disk_cmd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
return 1;
break;
default:
printf("Usage:\n%s\n", cmdtp->usage);
cmd_usage(cmdtp);
return 1;
} return 0;
With commit 47e26b1bf91ddef69f4a3892815c857db094cef9 [cmd_usage(): simplify return code handling] I suppose this should be directly changed to a return cmd_usage.
hadnt noticed that. ill send updated patches; thanks. -mike

Signed-off-by: Mike Frysinger vapier@gentoo.org --- v2 - tail into cmd_usage() as pointed out by Detlev Zundel
common/cmd_mgdisk.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/common/cmd_mgdisk.c b/common/cmd_mgdisk.c index c2d5217..51c994b 100644 --- a/common/cmd_mgdisk.c +++ b/common/cmd_mgdisk.c @@ -54,8 +54,7 @@ int do_mg_disk_cmd (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return 1; break; default: - printf("Usage:\n%s\n", cmdtp->usage); - return 1; + return cmd_usage(cmdtp); } return 0; }

Dear Mike Frysinger,
In message 1280425349-29672-1-git-send-email-vapier@gentoo.org you wrote:
Signed-off-by: Mike Frysinger vapier@gentoo.org
v2
- tail into cmd_usage() as pointed out by Detlev Zundel
common/cmd_mgdisk.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
participants (3)
-
Detlev Zundel
-
Mike Frysinger
-
Wolfgang Denk