diff options
author | Erwan Velu <erwan.velu@free.fr> | 2009-11-17 17:17:17 +0100 |
---|---|---|
committer | Erwan Velu <erwan.velu@free.fr> | 2009-11-17 17:17:17 +0100 |
commit | 99c4f54af72f2fdcc6357fdcadeb2e78da14016c (patch) | |
tree | 7da9ef6b34ef922bc52513b09ca6502cde4124d8 | |
parent | 42db62e7eeb2e6f985bc138638a642c442c095d8 (diff) | |
download | syslinux-99c4f54af72f2fdcc6357fdcadeb2e78da14016c.tar.gz |
hdt: Fixing type 6 detection in cli mode
Impact: Type 6 only systems would have been unable to show modules in
cli
This commit is completing bc6105b409291f0f15bbe99d348e5641a0f7c729
-rw-r--r-- | com32/hdt/hdt-cli-dmi.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/com32/hdt/hdt-cli-dmi.c b/com32/hdt/hdt-cli-dmi.c index 7755a06f..aecd72d3 100644 --- a/com32/hdt/hdt-cli-dmi.c +++ b/com32/hdt/hdt-cli-dmi.c @@ -529,6 +529,11 @@ void show_dmi_memory_modules(int argc __unused, char** argv __unused, /* Needed, if called by the memory mode */ detect_dmi(hardware); + if ((hardware->dmi.memory_count <= 0) && (hardware->dmi.memory_module_count <= 0)) { + more_printf("No memory module found\n"); + return; + } + /* Sanitize arguments */ if (argc > 0) { /* When we display a summary, there is no need to show the unpopulated banks @@ -539,11 +544,6 @@ void show_dmi_memory_modules(int argc __unused, char** argv __unused, goto usage; } - if (hardware->dmi.memory_count <= 0) { - more_printf("No memory module found\n"); - return; - } - reset_more_printf(); /* If type 17 is available */ if (hardware->dmi.memory_count>0) { |