projects
/
platform
/
upstream
/
syslinux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fdadbcf
)
hdt: in the cli, we have to Skip empty lines
author
Erwan Velu
<erwan.velu@free.fr>
Wed, 25 Mar 2009 22:25:38 +0000
(23:25 +0100)
committer
Erwan Velu
<erwan.velu@free.fr>
Wed, 25 Mar 2009 22:25:38 +0000
(23:25 +0100)
Impact: empty lines were confusing history
History works better when we ignore empty lines
com32/hdt/hdt-cli.c
patch
|
blob
|
history
diff --git
a/com32/hdt/hdt-cli.c
b/com32/hdt/hdt-cli.c
index
9ff6d90
..
8e71690
100644
(file)
--- 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++;