public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] fix flash_sect_erase() to display correct message
@ 2009-11-13  8:06 이승현
  2009-11-17 15:14 ` Stefan Roese
  2009-11-17 20:07 ` Wolfgang Denk
  0 siblings, 2 replies; 7+ messages in thread
From: 이승현 @ 2009-11-13  8:06 UTC (permalink / raw)
  To: u-boot

flash_sect_erase() displays message "Erased #N sectors" even when
there are some protected sectors found and command "erase" fail.

Signed-off-by: Seunghyeon Rhee <seunghyeon@lpmtec.com>
---
 common/cmd_flash.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/common/cmd_flash.c b/common/cmd_flash.c
index 3773412..b3d982f 100644
--- a/common/cmd_flash.c
+++ b/common/cmd_flash.c
@@ -451,7 +451,10 @@ int flash_sect_erase (ulong addr_first, ulong addr_last)
 				rcode = flash_erase (info, s_first[bank], s_last[bank]);
 			}
 		}
-		printf ("Erased %d sectors\n", erased);
+		if (rcode == ERR_PROTECTED)
+			printf ("Not erased - protected sector(s) found\n");
+		else
+			printf ("Erased %d sectors\n", erased);
 	} else if (rcode == 0) {
 		puts ("Error: start and/or end address"
 			" not on sector boundary\n");
-- 
1.6.2.5



-------
Seunghyeon Rhee, Ph.D. / Director
LPM Technology Inc.
T +82-70-8255-6007  F +82-2-6442-6462
M +82-10-2790-0657

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-11-18 22:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-13  8:06 [U-Boot] [PATCH] fix flash_sect_erase() to display correct message 이승현
2009-11-17 15:14 ` Stefan Roese
2009-11-17 21:22   ` Wolfgang Denk
2009-11-18  8:17     ` Stefan Roese
2009-11-17 20:07 ` Wolfgang Denk
2009-11-18  2:41   ` "Seunghyeon Rhee (이승현)"
2009-11-18 22:33     ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox