aboutsummaryrefslogtreecommitdiffstats
path: root/com32/elflink/ldlinux/cli.c
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2011-11-25 15:36:55 +0000
committerMatt Fleming <matt.fleming@intel.com>2011-12-02 12:13:30 +0000
commit9273fdfbac8bdb76d66ba2b2dbfbd860ad0434b3 (patch)
treebb76eff9999a992a075fc3f2cef0a89554f0b0ed /com32/elflink/ldlinux/cli.c
parent78c144a6d0f6682912ecfd7b8fcd4feabceab735 (diff)
downloadsyslinux-9273fdfbac8bdb76d66ba2b2dbfbd860ad0434b3.tar.gz
syslinux-9273fdfbac8bdb76d66ba2b2dbfbd860ad0434b3.tar.xz
syslinux-9273fdfbac8bdb76d66ba2b2dbfbd860ad0434b3.zip
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@intel.com>
Diffstat (limited to 'com32/elflink/ldlinux/cli.c')
-rw-r--r--com32/elflink/ldlinux/cli.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/com32/elflink/ldlinux/cli.c b/com32/elflink/ldlinux/cli.c
index 4749ddad..3bb7db4d 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)