[syslinux:elflink] ldlinux: Don' t return previous command if user pressenter enter

syslinux-bot for Matt Fleming matt.fleming at intel.com
Sat Dec 17 21:19:39 PST 2011


Commit-ID:  9273fdfbac8bdb76d66ba2b2dbfbd860ad0434b3
Gitweb:     http://www.syslinux.org/commit/9273fdfbac8bdb76d66ba2b2dbfbd860ad0434b3
Author:     Matt Fleming <matt.fleming at intel.com>
AuthorDate: Fri, 25 Nov 2011 15:36:55 +0000
Committer:  Matt Fleming <matt.fleming at intel.com>
CommitDate: Fri, 2 Dec 2011 12:13:30 +0000

ldlinux: Don't return previous command if user pressenter enter

If the user presses enter at the command prompt then simply print the
command prompt again on a newline - don't re-execute the previous
command.

Signed-off-by: Matt Fleming <matt.fleming at intel.com>

---
 com32/elflink/ldlinux/cli.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/com32/elflink/ldlinux/cli.c b/com32/elflink/ldlinux/cli.c
index 4749dda..3bb7db4 100644
--- a/com32/elflink/ldlinux/cli.c
+++ b/com32/elflink/ldlinux/cli.c
@@ -451,7 +451,7 @@ const char *edit_cmdline(const char *input, int top /*, int width */ ,
     strcpy(comm_counter->command, ret);
     list_add(&(comm_counter->list), &cli_history_head);
 
-    return ret;
+    return len ? ret : NULL;
 }
 
 static int cli_init(void)


More information about the Syslinux-commits mailing list