X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=common%2Fmain.c;h=a00ebc194c576460908e0d4680e8f807de4ab3fb;hb=98c440bee623ecdd5322852732b883e696fb2140;hp=f41d95c6ea47258856bf8b30469ec422124a71df;hpb=1f2a05898658900dc5717761e27abf2052e67e13;p=platform%2Fkernel%2Fu-boot.git diff --git a/common/main.c b/common/main.c index f41d95c..a00ebc1 100644 --- a/common/main.c +++ b/common/main.c @@ -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;