From: roger blofeld Date: Mon, 31 Jul 2006 09:08:54 -0700 (PDT) Subject: [U-Boot-Users] [PATCH] Fix control-c handing in CONFIG_CMDLINE_EDITING Message-ID: <20060731160854.70301.qmail@web53506.mail.yahoo.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Properly pass break code back from readline. -roger blofeld diff --git a/common/main.c b/common/main.c index 3788bd5..13d12a4 100644 --- a/common/main.c +++ b/common/main.c @@ -937,6 +937,7 @@ int readline (const char *const prompt) #ifdef CONFIG_CMDLINE_EDITING char *p = console_buffer; unsigned int len=MAX_CMDBUF_SIZE; + int rc; static int initted = 0; if (!initted) { @@ -946,8 +947,8 @@ #ifdef CONFIG_CMDLINE_EDITING puts (prompt); - cread_line(p, &len); - return len; + rc = cread_line(p, &len); + return rc < 0 ? rc : len; #else char *p = console_buffer; int n = 0; /* buffer index */ __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: int-fix.txt Url: http://lists.denx.de/pipermail/u-boot/attachments/20060731/4a606c8f/attachment.txt