]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/main.c
at91sam9x5ek: add USB configuration
[karo-tx-uboot.git] / common / main.c
index 9507cec88bfca5af2a694747646df9455e411c35..5fdfff2e28587eeb37adccda828d542d737e985d 100644 (file)
@@ -505,13 +505,13 @@ void reset_cmd_timeout(void)
 #define HIST_MAX               20
 #define HIST_SIZE              CONFIG_SYS_CBSIZE
 
-static int hist_max = 0;
-static int hist_add_idx = 0;
+static int hist_max;
+static int hist_add_idx;
 static int hist_cur = -1;
-unsigned hist_num = 0;
+static unsigned hist_num;
 
-char* hist_list[HIST_MAX];
-char hist_lines[HIST_MAX][HIST_SIZE + 1];       /* Save room for NULL */
+static char *hist_list[HIST_MAX];
+static 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)
 
@@ -1041,8 +1041,16 @@ int readline_into_buffer(const char *const prompt, char *buffer, int timeout)
                                        puts (tab_seq+(col&07));
                                        col += 8 - (col&07);
                                } else {
-                                       ++col;          /* echo input           */
-                                       putc (c);
+                                       char buf[2];
+
+                                       /*
+                                        * Echo input using puts() to force am
+                                        * LCD flush if we are using an LCD
+                                        */
+                                       ++col;
+                                       buf[0] = c;
+                                       buf[1] = '\0';
+                                       puts(buf);
                                }
                                *p++ = c;
                                ++n;