summaryrefslogtreecommitdiff
path: root/com32/hdt/hdt-cli-dmi.c
diff options
context:
space:
mode:
authorErwan Velu <erwan.velu@free.fr>2009-05-01 07:48:35 +0200
committerErwan Velu <erwan.velu@free.fr>2009-05-01 07:48:35 +0200
commitc9621dba0331d0024f9c43fc2a5a9f91decded67 (patch)
treedcfab18f69a02ebd1d1f2884f80524465312a7e4 /com32/hdt/hdt-cli-dmi.c
parentd222f57d5fce7908f7cca3f32546ac789e8b3f4d (diff)
downloadsyslinux-c9621dba0331d0024f9c43fc2a5a9f91decded67.tar.gz
hdt: removing useless clear screen on dmi> show memory
Impact: Improving display usage No need to clearscreen for such display
Diffstat (limited to 'com32/hdt/hdt-cli-dmi.c')
-rw-r--r--com32/hdt/hdt-cli-dmi.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/com32/hdt/hdt-cli-dmi.c b/com32/hdt/hdt-cli-dmi.c
index d395c672..4e18b794 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) {