summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErwan Velu <erwan.velu@free.fr>2009-05-01 05:48:35 (GMT)
committerErwan Velu <erwan.velu@free.fr>2009-05-01 05:48:35 (GMT)
commitc9621dba0331d0024f9c43fc2a5a9f91decded67 (patch)
treedcfab18f69a02ebd1d1f2884f80524465312a7e4
parentd222f57d5fce7908f7cca3f32546ac789e8b3f4d (diff)
downloadhdt-c9621dba0331d0024f9c43fc2a5a9f91decded67.zip
hdt-c9621dba0331d0024f9c43fc2a5a9f91decded67.tar.gz
hdt-c9621dba0331d0024f9c43fc2a5a9f91decded67.tar.bz2
hdt-c9621dba0331d0024f9c43fc2a5a9f91decded67.tar.xz
hdt: removing useless clear screen on dmi> show memory
Impact: Improving display usage No need to clearscreen for such display
-rw-r--r--com32/hdt/hdt-cli-dmi.c12
-rw-r--r--com32/hdt/hdt-cli-hdt.c4
2 files changed, 4 insertions, 12 deletions
diff --git a/com32/hdt/hdt-cli-dmi.c b/com32/hdt/hdt-cli-dmi.c
index d395c67..4e18b79 100644
--- a/com32/hdt/hdt-cli-dmi.c
+++ b/com32/hdt/hdt-cli-dmi.c
@@ -374,19 +374,13 @@ void main_show_dmi(int argc __unused, char **argv __unused,
void show_dmi_memory_modules(int argc __unused, char** argv __unused,
struct s_hardware *hardware)
{
- int clear = 1, show_free_banks = 1;
+ int show_free_banks = 1;
/* Sanitize arguments */
if (argc > 0) {
- clear = strtol(argv[0], NULL, 10);
- if (errno == ERANGE || clear < 0 || clear > 1)
- goto usage;
-
- if (argc > 1) {
- show_free_banks = strtol(argv[1], NULL, 10);
+ show_free_banks = strtol(argv[0], NULL, 10);
if (errno == ERANGE || show_free_banks < 0 || show_free_banks > 1)
goto usage;
- }
}
char bank_number[10];
@@ -398,8 +392,6 @@ void show_dmi_memory_modules(int argc __unused, char** argv __unused,
return;
}
- if (clear)
- clear_screen();
more_printf("Memory Banks\n");
for (int i = 0; i < hardware->dmi.memory_count; i++) {
if (hardware->dmi.memory[i].filled == true) {
diff --git a/com32/hdt/hdt-cli-hdt.c b/com32/hdt/hdt-cli-hdt.c
index df86e69..8069b19 100644
--- a/com32/hdt/hdt-cli-hdt.c
+++ b/com32/hdt/hdt-cli-hdt.c
@@ -217,8 +217,8 @@ void main_show_summary(int argc __unused, char **argv __unused,
more_printf(" Release : %s\n",
hardware->dmi.bios.release_date);
- int argc = 2;
- char *argv[2] = { "0", "0" };
+ int argc = 1;
+ char *argv[1] = { "0" };
show_dmi_memory_modules(argc, argv, hardware);
}
main_show_pci(argc, argv, hardware);