Merge with /home/wd/git/u-boot/custodian/u-boot-testing
[platform/kernel/u-boot.git] / common / main.c
index f41d95c..a00ebc1 100644 (file)
@@ -962,7 +962,7 @@ int readline (const char *const prompt)
                        n = 0;
                        continue;
 
-               case 0x17:                              /* ^W - erase word      */
+               case 0x17:                              /* ^W - erase word      */
                        p=delete_char(console_buffer, p, &col, &n, plen);
                        while ((n > 0) && (*p != ' ')) {
                                p=delete_char(console_buffer, p, &col, &n, plen);
@@ -1191,6 +1191,8 @@ static void process_macros (const char *input, char *output)
 
        if (outputcnt)
                *output = 0;
+       else
+               *(output - 1) = 0;
 
 #ifdef DEBUG_PARSER
        printf ("[PROCESS_MACROS] OUTPUT len %d: \"%s\"\n",
@@ -1334,7 +1336,7 @@ int run_command (const char *cmd, int flag)
 
                /* Did the user stop this? */
                if (had_ctrlc ())
-                       return 0;       /* if stopped then not repeatable */
+                       return -1;      /* if stopped then not repeatable */
        }
 
        return rc ? rc : repeatable;