Skip to contentSkip to conversation

Replace MAX_CMDBUF_SIZE references with CONFIG_SYS_CBSIZE

PATCH New Peter Tyser 2 participants 2 messages Sep 29, 2010 – Oct 6, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Replace MAX_CMDBUF_SIZE references with CONFIG_SYS_CBSIZE

The MAX_CMDBUF_SIZE define is unneeded as it should always equal CONFIG_SYS_CBSIZE.

---
 common/main.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)
common/main.c +2 -5
index 8d548db..d97ccd7 100644
@@ -518,9 +518,6 @@ void reset_cmd_timeout(void)
 	} while (0)
 
 #define CTL_CH(c)		((c) - 'a' + 1)
-
-#define MAX_CMDBUF_SIZE		CONFIG_SYS_CBSIZE
-
 #define CTL_BACKSPACE		('\b')
 #define DEL			((char)255)
 #define DEL7			((char)127)
@@ -531,7 +528,7 @@ void reset_cmd_timeout(void)
 #define getcmd_cbeep()		getcmd_putch('\a')
 
 #define HIST_MAX		20
-#define HIST_SIZE		MAX_CMDBUF_SIZE
+#define HIST_SIZE		CONFIG_SYS_CBSIZE
 
 static int hist_max = 0;
 static int hist_add_idx = 0;
@@ -947,7 +944,7 @@ int readline_into_buffer (const char *const prompt, char * buffer)
 {
 	char *p = buffer;
 #ifdef CONFIG_CMDLINE_EDITING
-	unsigned int len=MAX_CMDBUF_SIZE;
+	unsigned int len = CONFIG_SYS_CBSIZE;
 	int rc;
 	static int initted = 0;
 
Signature · 1 line
1.7.0.4
#1 lore raw

PATCH 1/1 Replace MAX_CMDBUF_SIZE references with CONFIG_SYS_CBSIZE

Dear Peter Tyser,

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

The MAX_CMDBUF_SIZE define is unneeded as it should always equal CONFIG_SYS_CBSIZE.

---
 common/main.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 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
Severe culture shock results when experts from another protocol suite
[...] try to read OSI documents. The term "osified" is used to  refer
to  such  documents. [...] Any relationship to the word "ossified" is
purely intentional.                                - Marshall T. Rose