From: Masahiro Yamada <yamada.m@jp.panasonic.com>
Date: Thu, 11 Jul 2013 08:29:57 +0000 (+0900)
Subject: cmd_nand: Do not show usage when scrub is aborted
X-Git-Tag: v2025.01-rc5-pxa1908~15947
X-Git-Url: http://git.dujemihanovic.xyz/html/static/%7B%7B%20%24.Site.BaseURL%20%7D%7Dposts/index.xml?a=commitdiff_plain;h=46aabcc446dbae5637f2b9106c1f2be9326c1018;p=u-boot.git

cmd_nand: Do not show usage when scrub is aborted

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>
---

diff --git a/common/cmd_nand.c b/common/cmd_nand.c
index adc1ce4435..04ab0f19be 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);