hdt: Remove unused cli_mode parameter
authorPierre-Alexandre Meyer <pierre@mouraf.org>
Sat, 14 Mar 2009 19:59:11 +0000 (12:59 -0700)
committerPierre-Alexandre Meyer <pierre@mouraf.org>
Sat, 14 Mar 2009 22:31:23 +0000 (15:31 -0700)
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>
com32/hdt/hdt-cli-dmi.c
com32/hdt/hdt-cli.c
com32/hdt/hdt-cli.h

index 30b9e86..0fe0845 100644 (file)
@@ -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",
index 5845722..6f75d62 100644 (file)
@@ -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))) {
index 053940f..bcd5ae1 100644 (file)
@@ -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);