summaryrefslogtreecommitdiff
path: root/com32/hdt/hdt-cli-hdt.c
diff options
context:
space:
mode:
authorErwan Velu <erwanaliasr1@gmail.com>2012-05-27 11:41:39 +0200
committerErwan Velu <erwanaliasr1@gmail.com>2012-05-27 11:41:39 +0200
commit1697594b61f9a8f9d092996afc0e2c80bbb2a20a (patch)
tree253b7535c5ba0477dc22a2892d1a4f66b33ad30f /com32/hdt/hdt-cli-hdt.c
parent748979d7bda20e876806e5aab8554ee2e5a35c8c (diff)
downloadsyslinux-1697594b61f9a8f9d092996afc0e2c80bbb2a20a.tar.gz
hdt: Adding nomodule support in cli
Some new commands might need being able to manage the argv directly instead of the much more oriented scheme we had until now. This commit add a .nomodule option to cli object to explically tell they don't have a module as parameter but only arguments. This will be needed for the 'say' command.
Diffstat (limited to 'com32/hdt/hdt-cli-hdt.c')
-rw-r--r--com32/hdt/hdt-cli-hdt.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/com32/hdt/hdt-cli-hdt.c b/com32/hdt/hdt-cli-hdt.c
index e9752612..555237e3 100644
--- a/com32/hdt/hdt-cli-hdt.c
+++ b/com32/hdt/hdt-cli-hdt.c
@@ -264,26 +264,32 @@ struct cli_callback_descr list_hdt_default_modules[] = {
{
.name = CLI_CLEAR,
.exec = cli_clear_screen,
+ .nomodule = false,
},
{
.name = CLI_EXIT,
.exec = do_exit,
+ .nomodule = false,
},
{
.name = CLI_HELP,
.exec = show_cli_help,
+ .nomodule = false,
},
{
.name = CLI_MENU,
.exec = goto_menu,
+ .nomodule = false,
},
{
.name = CLI_REBOOT,
.exec = do_reboot,
+ .nomodule = false,
},
{
.name = CLI_HISTORY,
.exec = print_history,
+ .nomodule = false,
},
{
.name = CLI_DUMP,
@@ -291,69 +297,85 @@ struct cli_callback_descr list_hdt_default_modules[] = {
},
{
.name = NULL,
- .exec = NULL},
+ .exec = NULL,
+ .nomodule = false},
};
struct cli_callback_descr list_hdt_show_modules[] = {
{
.name = CLI_SUMMARY,
.exec = main_show_summary,
+ .nomodule = false,
},
{
.name = CLI_PCI,
.exec = main_show_pci,
+ .nomodule = false,
},
{
.name = CLI_DMI,
.exec = main_show_dmi,
+ .nomodule = false,
},
{
.name = CLI_CPU,
.exec = main_show_cpu,
+ .nomodule = false,
},
{
.name = CLI_DISK,
.exec = disks_summary,
+ .nomodule = false,
},
{
.name = CLI_PXE,
.exec = main_show_pxe,
+ .nomodule = false,
},
{
.name = CLI_SYSLINUX,
.exec = main_show_syslinux,
+ .nomodule = false,
},
{
.name = CLI_KERNEL,
.exec = main_show_kernel,
+ .nomodule = false,
},
{
.name = CLI_VESA,
.exec = main_show_vesa,
+ .nomodule = false,
},
{
.name = CLI_HDT,
.exec = main_show_hdt,
+ .nomodule = false,
},
{
.name = CLI_VPD,
.exec = main_show_vpd,
+ .nomodule = false,
},
{
.name = CLI_MEMORY,
.exec = show_dmi_memory_modules,
+ .nomodule = false,
},
{
.name = CLI_ACPI,
.exec = main_show_acpi,
+ .nomodule = false,
},
{
.name = "modes",
.exec = main_show_modes,
+ .nomodule = false,
},
{
.name = NULL,
.exec = NULL,
+ .nomodule = false,
},
};
@@ -361,10 +383,12 @@ struct cli_callback_descr list_hdt_set_modules[] = {
{
.name = CLI_MODE,
.exec = cli_set_mode,
+ .nomodule = false,
},
{
.name = NULL,
.exec = NULL,
+ .nomodule = false,
},
};