summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErwan Velu <erwan.velu@free.fr>2009-03-25 23:38:29 +0100
committerErwan Velu <erwan.velu@free.fr>2009-03-25 23:38:29 +0100
commit9169a71155fc18d78bd90b364a29e2c88f0e29b6 (patch)
tree53e52eabf90af47e81c595e4148546d8cf9fb8e2
parent027c8f7418ce6ec9705d4c08b6564b64179e5da8 (diff)
parent84fa14d88f0dfb8db929e7163b30718f9d104654 (diff)
downloadsyslinux-9169a71155fc18d78bd90b364a29e2c88f0e29b6.tar.gz
Merge commit 'origin/erwan'
-rw-r--r--com32/hdt/hdt-cli.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/com32/hdt/hdt-cli.c b/com32/hdt/hdt-cli.c
index 9ff6d90f..8e716904 100644
--- a/com32/hdt/hdt-cli.c
+++ b/com32/hdt/hdt-cli.c
@@ -497,6 +497,12 @@ void start_cli_mode(struct s_hardware *hardware)
case KEY_ENTER:
more_printf("\n");
+
+ /* We have to skip empty lines */
+ if (strlen(skipspace(cli.input))<1) {
+ reset_prompt(&cli);
+ break;
+ }
if (cli.history_pos == MAX_HISTORY_SIZE-1) cli.history_pos=1;
strncpy(cli.history[cli.history_pos],skipspace(cli.input),sizeof(cli.history[cli.history_pos]));
cli.history_pos++;