aboutsummaryrefslogtreecommitdiffstats
path: root/com32/hdt
diff options
context:
space:
mode:
authorPierre-Alexandre Meyer <pierre@mouraf.org>2009-03-14 12:59:11 -0700
committerPierre-Alexandre Meyer <pierre@mouraf.org>2009-03-14 15:31:23 -0700
commitd4524c52e922b097ab4427fcb739f0ab0e3386e5 (patch)
tree0275f223d18899cde452405cba7b186242d349ce /com32/hdt
parent45a351645adaad5aa40c007bde232affb8f27253 (diff)
downloadsyslinux.git-d4524c52e922b097ab4427fcb739f0ab0e3386e5.tar.gz
syslinux.git-d4524c52e922b097ab4427fcb739f0ab0e3386e5.tar.xz
syslinux.git-d4524c52e922b097ab4427fcb739f0ab0e3386e5.zip
hdt: Remove unused cli_mode parameter
Impact: Signatures changes. Uniform the main_show_* signatures by removing the parameter cli_mode from main_show_dmi. The call to do_exit has been removed (it was useless anyway). This allowed us to remove the cli_mode parameter from handle_hdt_commands as well. This change fixes all compilation warnings related to the cli. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Diffstat (limited to 'com32/hdt')
-rw-r--r--com32/hdt/hdt-cli-dmi.c3
-rw-r--r--com32/hdt/hdt-cli.c13
-rw-r--r--com32/hdt/hdt-cli.h5
3 files changed, 8 insertions, 13 deletions
diff --git a/com32/hdt/hdt-cli-dmi.c b/com32/hdt/hdt-cli-dmi.c
index 30b9e861..0fe0845b 100644
--- a/com32/hdt/hdt-cli-dmi.c
+++ b/com32/hdt/hdt-cli-dmi.c
@@ -392,14 +392,13 @@ void handle_dmi_commands(char *cli_line, struct s_hardware *hardware)
}
}
-void main_show_dmi(struct s_hardware *hardware, struct s_cli_mode *cli_mode)
+void main_show_dmi(struct s_hardware *hardware)
{
detect_dmi(hardware);
if (hardware->is_dmi_valid == false) {
printf("No valid DMI table found, exiting.\n");
- do_exit(cli_mode);
return;
}
printf("DMI Table version %d.%d found\n",
diff --git a/com32/hdt/hdt-cli.c b/com32/hdt/hdt-cli.c
index 58457224..6f75d626 100644
--- a/com32/hdt/hdt-cli.c
+++ b/com32/hdt/hdt-cli.c
@@ -108,13 +108,11 @@ static void set_mode(struct s_cli_mode *cli_mode, cli_mode_t mode,
}
}
-static void handle_hdt_commands(char *cli_line, struct s_cli_mode *cli_mode,
- struct s_hardware *hardware)
+static void handle_hdt_commands(char *cli_line, struct s_hardware *hardware)
{
/* hdt cli mode specific commands */
if (!strncmp(cli_line, CLI_SHOW, sizeof(CLI_SHOW) - 1)) {
- main_show(strstr(cli_line, "show") + sizeof(CLI_SHOW), hardware,
- cli_mode);
+ main_show(strstr(cli_line, "show") + sizeof(CLI_SHOW), hardware);
return;
}
}
@@ -217,7 +215,7 @@ void start_cli_mode(struct s_hardware *hardware)
handle_pci_commands(cli_line, hardware);
break;
case HDT_MODE:
- handle_hdt_commands(cli_line, &cli_mode, hardware);
+ handle_hdt_commands(cli_line, hardware);
break;
case CPU_MODE:
handle_cpu_commands(cli_line, hardware);
@@ -299,8 +297,7 @@ void show_main_help(struct s_hardware *hardware)
more_printf(" %s\n", CLI_PXE);
}
-void main_show(char *item, struct s_hardware *hardware,
- struct s_cli_mode *cli_mode)
+void main_show(char *item, struct s_hardware *hardware)
{
if (!strncmp(item, CLI_SUMMARY, sizeof(CLI_SUMMARY))) {
main_show_summary(hardware);
@@ -311,7 +308,7 @@ void main_show(char *item, struct s_hardware *hardware,
return;
}
if (!strncmp(item, CLI_DMI, sizeof(CLI_DMI))) {
- main_show_dmi(hardware, cli_mode);
+ main_show_dmi(hardware);
return;
}
if (!strncmp(item, CLI_CPU, sizeof(CLI_CPU))) {
diff --git a/com32/hdt/hdt-cli.h b/com32/hdt/hdt-cli.h
index 053940fd..bcd5ae11 100644
--- a/com32/hdt/hdt-cli.h
+++ b/com32/hdt/hdt-cli.h
@@ -68,8 +68,7 @@ struct s_cli_mode {
};
void start_cli_mode(struct s_hardware *hardware);
-void main_show(char *item, struct s_hardware *hardware,
- struct s_cli_mode *cli_mode);
+void main_show(char *item, struct s_hardware *hardware);
int do_exit(struct s_cli_mode *cli_mode);
// DMI STUFF
@@ -81,7 +80,7 @@ int do_exit(struct s_cli_mode *cli_mode);
#define CLI_DMI_MEMORY_BANK "bank"
#define CLI_DMI_PROCESSOR "cpu"
#define CLI_DMI_SYSTEM "system"
-void main_show_dmi(struct s_hardware *hardware, struct s_cli_mode *cli_mode);
+void main_show_dmi(struct s_hardware *hardware);
void handle_dmi_commands(char *cli_line, struct s_hardware *hardware);
void show_dmi_memory_modules(struct s_hardware *hardware, bool clearscreen,
bool show_free_banks);