summaryrefslogtreecommitdiff
path: root/com32/hdt/hdt-cli.h
diff options
context:
space:
mode:
authorPierre-Alexandre Meyer <pierre@mouraf.org>2009-03-19 19:15:00 -0700
committerPierre-Alexandre Meyer <pierre@mouraf.org>2009-03-19 19:15:00 -0700
commitf40b8b8f5f6674b7b4e092b43b32780a62ba5e3f (patch)
tree86e5e3ec7723aa4720b36f001147c9916c10877b /com32/hdt/hdt-cli.h
parent2c3d9eba8ad1715117bb30bc655cff3cbcebbfc9 (diff)
parente94feba4b1844e34f27b6720157e886707cd6e00 (diff)
downloadsyslinux-f40b8b8f5f6674b7b4e092b43b32780a62ba5e3f.tar.gz
Merge commit 'erwan-private/master' into for-erwan
Conflicts: com32/hdt/hdt-cli.c com32/hdt/hdt-cli.h
Diffstat (limited to 'com32/hdt/hdt-cli.h')
-rw-r--r--com32/hdt/hdt-cli.h28
1 files changed, 15 insertions, 13 deletions
diff --git a/com32/hdt/hdt-cli.h b/com32/hdt/hdt-cli.h
index acdb9e5b..e2b71b25 100644
--- a/com32/hdt/hdt-cli.h
+++ b/com32/hdt/hdt-cli.h
@@ -29,6 +29,7 @@
#ifndef DEFINE_HDT_CLI_H
#define DEFINE_HDT_CLI_H
#include <stdio.h>
+#include <getkey.h>
#include "hdt-common.h"
@@ -66,34 +67,36 @@ typedef enum {
VESA_MODE,
} cli_mode_t;
-struct s_cli_mode {
- cli_mode_t mode;
- char prompt[32];
+struct s_cli {
+ cli_mode_t mode;
+ char prompt[32];
+ char input[MAX_LINE_SIZE];
+ int cursor_pos;
};
/* A command-line command */
struct commands_mode {
- const unsigned int mode;
- struct commands_module_descr *show_modules;
- /* Future: set? */
+ const unsigned int mode;
+ struct commands_module_descr* show_modules;
+ /* Future: set? */
};
struct commands_module {
- const char *name;
- void (*exec) (int argc, char **argv, struct s_hardware * hardware);
+ const char *name;
+ void ( * exec ) ( int argc, char** argv, struct s_hardware *hardware );
};
/* Describe 'show', 'set', ... commands in a module */
struct commands_module_descr {
- struct commands_module *modules;
- const int nb_modules;
+ struct commands_module* modules;
+ const int nb_modules;
};
struct commands_mode dmi_mode;
void start_cli_mode(struct s_hardware *hardware);
void main_show(char *item, struct s_hardware *hardware);
-int do_exit(struct s_cli_mode *cli_mode);
+int do_exit(struct s_cli *cli);
// DMI STUFF
#define CLI_DMI_BASE_BOARD "base_board"
@@ -108,8 +111,7 @@ int do_exit(struct s_cli_mode *cli_mode);
#define CLI_DMI_MAX_MODULES 9
void main_show_dmi(struct s_hardware *hardware);
void handle_dmi_commands(char *cli_line, struct s_hardware *hardware);
-void show_dmi_memory_modules(int argc, char **argv,
- struct s_hardware *hardware);
+void show_dmi_memory_modules(int argc, char** argv, struct s_hardware *hardware);
// PCI STUFF
#define CLI_PCI_DEVICE "device"