summaryrefslogtreecommitdiff
path: root/common/main.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2010-04-01 11:28:32 +0200
committerWolfgang Denk <wd@denx.de>2010-04-01 11:28:32 +0200
commitffa37fc98d71ef930bccd4e9eed37f6ce6b4d6af (patch)
tree206908754219b5cc6e9f03518d34fb95a247bef9 /common/main.c
parentca6e1c136ddb720c3bb2cc043b99f7f06bc46c55 (diff)
parentfd03ea89641d6f6ade6d1a8580c1bb9f52b8542c (diff)
downloadu-boot-imx-ffa37fc98d71ef930bccd4e9eed37f6ce6b4d6af.zip
u-boot-imx-ffa37fc98d71ef930bccd4e9eed37f6ce6b4d6af.tar.gz
u-boot-imx-ffa37fc98d71ef930bccd4e9eed37f6ce6b4d6af.tar.bz2
Merge branch 'next'
Diffstat (limited to 'common/main.c')
-rw-r--r--common/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/main.c b/common/main.c
index c860b0b..3949a5b 100644
--- a/common/main.c
+++ b/common/main.c
@@ -68,7 +68,7 @@ static int abortboot(int);
#undef DEBUG_PARSER
-char console_buffer[CONFIG_SYS_CBSIZE]; /* console I/O buffer */
+char console_buffer[CONFIG_SYS_CBSIZE + 1]; /* console I/O buffer */
static char * delete_char (char *buffer, char *p, int *colp, int *np, int plen);
static char erase_seq[] = "\b \b"; /* erase sequence */
@@ -526,7 +526,7 @@ void reset_cmd_timeout(void)
#define CTL_CH(c) ((c) - 'a' + 1)
-#define MAX_CMDBUF_SIZE 256
+#define MAX_CMDBUF_SIZE CONFIG_SYS_CBSIZE
#define CTL_BACKSPACE ('\b')
#define DEL ((char)255)
@@ -546,7 +546,7 @@ static int hist_cur = -1;
unsigned hist_num = 0;
char* hist_list[HIST_MAX];
-char hist_lines[HIST_MAX][HIST_SIZE];
+char hist_lines[HIST_MAX][HIST_SIZE + 1]; /* Save room for NULL */
#define add_idx_minus_one() ((hist_add_idx == 0) ? hist_max : hist_add_idx-1)