diff mbox

[U-Boot] cmd_nand: Do not show usage when scrub is aborted

Message ID 1373531397-32060-1-git-send-email-yamada.m@jp.panasonic.com
State Accepted
Delegated to: Scott Wood
Headers show

Commit Message

Masahiro Yamada July 11, 2013, 8:29 a.m. UTC
When executing nand scrub, the user gets the prompt:

  Really scrub this NAND flash? <y/N>

We do not want the annoying usage displayed when saying N here.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---
 common/cmd_nand.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Scott Wood Aug. 22, 2013, 10:44 p.m. UTC | #1
On Thu, Jul 11, 2013 at 05:29:57PM +0900, Masahiro Yamada wrote:
> When executing nand scrub, the user gets the prompt:
> 
>   Really scrub this NAND flash? <y/N>
> 
> We do not want the annoying usage displayed when saying N here.
> 
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
> 
> ---
> common/cmd_nand.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Applied to u-boot-nand-flash.

-Scott
diff mbox

Patch

diff --git a/common/cmd_nand.c b/common/cmd_nand.c
index adc1ce4..04ab0f1 100644
--- a/common/cmd_nand.c
+++ b/common/cmd_nand.c
@@ -616,11 +616,11 @@  static int do_nand(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 					opts.scrub = 1;
 				else {
 					puts("scrub aborted\n");
-					return -1;
+					return 1;
 				}
 			} else {
 				puts("scrub aborted\n");
-				return -1;
+				return 1;
 			}
 		}
 		ret = nand_erase_opts(nand, &opts);