Skip to contentSkip to conversation

Additional fix to readline_into_buffer() with CONFIG_CMDLINE_EDITING before relocating

PATCH New Peter Tyser 2 participants 2 messages May 22, 2008 – Jun 4, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Additional fix to readline_into_buffer() with CONFIG_CMDLINE_EDITING before relocating

Removed unneeded command line history initialization. Also, the original code would access the 'initted' variable before relocation to SDRAM which resulted in erratic behavior since the bss is not initialized when executing from flash.

---
 common/main.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)
common/main.c +0 -6
index a17b60b..046da6f 100644
@@ -940,12 +940,6 @@ int readline_into_buffer (const char *const prompt, char * buffer)
 	int rc;
 	static int initted = 0;
 
-	if (!initted) {
-		hist_init();
-		initted = 1;
-	}
-
-
 	/*
 	 * History uses a global array which is not
 	 * writable until after relocation to RAM.
Signature · 1 line
1.5.4.3
#1 lore raw

PATCH 1/1 Additional fix to readline_into_buffer() with CONFIG_CMDLINE_EDITING before relocating

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

Removed unneeded command line history initialization. Also, the original code would access the 'initted' variable before relocation to SDRAM which resulted in erratic behavior since the bss is not initialized when executing from flash.

---
 common/main.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 4 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
This is now.  Later is later.