diff options
author | Erwan Velu <erwan.velu@free.fr> | 2009-11-25 23:10:34 +0100 |
---|---|---|
committer | Erwan Velu <erwan.velu@free.fr> | 2009-12-04 10:11:13 +0100 |
commit | 584a12c6981a020af5a6d9a4155ce8feffb94235 (patch) | |
tree | f71efa45f0c3ba5b4874230782c5b580f860b104 | |
parent | 0d4242b4410c708004d743243555b62680a69acd (diff) | |
download | syslinux-584a12c6981a020af5a6d9a4155ce8feffb94235.tar.gz |
hdt: Adding history command
Impact: new command 'history'
This command allow to see the content of the history
-rw-r--r-- | com32/hdt/hdt-cli-hdt.c | 4 | ||||
-rw-r--r-- | com32/hdt/hdt-cli.c | 1 | ||||
-rw-r--r-- | com32/hdt/hdt-cli.h | 3 |
3 files changed, 7 insertions, 1 deletions
diff --git a/com32/hdt/hdt-cli-hdt.c b/com32/hdt/hdt-cli-hdt.c index 99a54b41..86d95fe7 100644 --- a/com32/hdt/hdt-cli-hdt.c +++ b/com32/hdt/hdt-cli-hdt.c @@ -275,6 +275,10 @@ struct cli_callback_descr list_hdt_default_modules[] = { .exec = do_reboot, }, { + .name = CLI_HISTORY, + .exec = print_history, + }, + { .name = NULL, .exec = NULL}, }; diff --git a/com32/hdt/hdt-cli.c b/com32/hdt/hdt-cli.c index 1a6997a1..7a710a10 100644 --- a/com32/hdt/hdt-cli.c +++ b/com32/hdt/hdt-cli.c @@ -782,7 +782,6 @@ void start_auto_mode(struct s_hardware *hardware) void print_history() { - printf("History\n"); for (int i = 1; i < MAX_HISTORY_SIZE - 1; i++) { if (i == hdt_cli.history_pos) { printf("*%d:'%s'\n", i, hdt_cli.history[i]); diff --git a/com32/hdt/hdt-cli.h b/com32/hdt/hdt-cli.h index 12e71274..7d8a0261 100644 --- a/com32/hdt/hdt-cli.h +++ b/com32/hdt/hdt-cli.h @@ -157,6 +157,9 @@ void start_cli_mode(struct s_hardware *hardware); void start_auto_mode(struct s_hardware *hardware); void main_show(char *item, struct s_hardware *hardware); +#define CLI_HISTORY "history" +void print_history(); + // DMI STUFF #define CLI_DMI_BASE_BOARD "base_board" #define CLI_DMI_BATTERY "battery" |