Skip to contentSkip to conversation

env_flash: Disable debug print statements

PATCH New Peter Tyser 2 participants 2 messages Oct 22, 2010 – Oct 23, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 env_flash: Disable debug print statements

With debug the follow is printed:
=> saveenv
Saving Environment to Flash...
Data to save 0x18000
Data (start 0xfff48000, len 0x18000) saved at 0x7fe63f20 Protect off FFF40000 ... FFF5FFFF
Un-Protected 1 sectors
Erasing Flash...
. done
Erased 1 sectors
Writing to Flash... Restoring the rest of data to 0xfff48000 len 0x18000 done
Protected 1 sectors
=>

Without debug:
=> saveenv
Saving Environment to Flash...
Un-Protected 1 sectors
Erasing Flash...
. done
Erased 1 sectors
Writing to Flash... done
Protected 1 sectors
=>

---
 common/env_flash.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
common/env_flash.c +0 -3
index 1da78b7..54c0bfe 100644
@@ -82,9 +82,6 @@ uchar env_get_char_spec(int index)
 	return (*((uchar *)(gd->env_addr + index)));
 }
 
-#undef debug
-#define debug printf
-
 #ifdef CONFIG_ENV_ADDR_REDUND
 
 int  env_init(void)
Signature · 1 line
1.7.0.4
#1 lore raw

PATCH 1/1 env_flash: Disable debug print statements

Dear Peter Tyser,

Quoted 26 lines · In message <[email protected]> you wrote:

With debug the follow is printed:
=> saveenv
Saving Environment to Flash...
Data to save 0x18000
Data (start 0xfff48000, len 0x18000) saved at 0x7fe63f20 Protect off FFF40000 ... FFF5FFFF
Un-Protected 1 sectors
Erasing Flash...
. done
Erased 1 sectors
Writing to Flash... Restoring the rest of data to 0xfff48000 len 0x18000 done
Protected 1 sectors
=>

Without debug:
=> saveenv
Saving Environment to Flash...
Un-Protected 1 sectors
Erasing Flash...
. done
Erased 1 sectors
Writing to Flash... done
Protected 1 sectors
=>

Quoted 4 lines
---
 common/env_flash.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 7 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Carelessly planned projects take three times longer to complete  than
expected.  Carefully  planned  projects  take  four  times  longer to
complete than expected, mostly  because  the  planners  expect  their
planning to reduce the time it takes.