return;
}
if ( !strncmp(item, CLI_DMI_MEMORY, sizeof(CLI_DMI_MEMORY) - 1) ) {
- show_dmi_memory_modules(hardware,true);
+ show_dmi_memory_modules(hardware,true,true);
return;
}
if ( !strncmp(item, CLI_DMI_MEMORY_BANK, sizeof(CLI_DMI_MEMORY_BANK) - 1) ) {
}
-void show_dmi_memory_modules(struct s_hardware *hardware, bool clear) {
+void show_dmi_memory_modules(struct s_hardware *hardware, bool clear, bool show_free_banks) {
char bank_number[10];
char available_dmi_commands[1024];
memset(available_dmi_commands,0,sizeof(available_dmi_commands));
memset(bank_number,0,sizeof(bank_number));
snprintf(bank_number,sizeof(bank_number),"%d ",i);
strncat(available_dmi_commands,bank_number,sizeof(bank_number));
+ if (show_free_banks==false) {
if (strncmp(hardware->dmi.memory[i].size,"Free",4))
printf(" bank %02d : %s %s@%s\n",i,hardware->dmi.memory[i].size, hardware->dmi.memory[i].type, hardware->dmi.memory[i].speed);
+ } else {
+ printf(" bank %02d : %s %s@%s\n",i,hardware->dmi.memory[i].size, hardware->dmi.memory[i].type, hardware->dmi.memory[i].speed);
+ }
}
}
//printf("Type 'show bank<bank_number>' for more details.\n");
more_printf("Bios\n");
more_printf(" Version : %s\n",hardware->dmi.bios.version);
more_printf(" Release : %s\n",hardware->dmi.bios.release_date);
- show_dmi_memory_modules(hardware,false);
+ show_dmi_memory_modules(hardware,false,false);
}
main_show_pci(hardware);
if (hardware->is_pxe_valid)
void show_dmi_chassis(struct s_hardware *hardware);
void show_dmi_cpu(struct s_hardware *hardware);
void show_dmi_modules(struct s_hardware *hardware);
-void show_dmi_memory_modules(struct s_hardware *hardware,bool clearscreen);
+void show_dmi_memory_modules(struct s_hardware *hardware,bool clearscreen, bool show_free_banks);
void show_dmi_memory_bank(struct s_hardware *hardware, const char *item);
void show_dmi_battery(struct s_hardware *hardware);