From 99c4f54af72f2fdcc6357fdcadeb2e78da14016c Mon Sep 17 00:00:00 2001 From: Erwan Velu Date: Tue, 17 Nov 2009 17:17:17 +0100 Subject: 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 --- com32/hdt/hdt-cli-dmi.c | 10 +++++----- 1 file 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) { -- cgit v1.2.1