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 <[email protected]> --- 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 _______________________________________________ U-Boot mailing list [email protected] http://lists.denx.de/mailman/listinfo/u-boot

