diff options
author | Erwan Velu <erwan.velu@free.fr> | 2009-03-01 13:27:48 +0100 |
---|---|---|
committer | Erwan Velu <erwan.velu@free.fr> | 2009-03-01 13:27:48 +0100 |
commit | 5b71509662a5b6167f95233c7f0824b4031130b2 (patch) | |
tree | 345f0a2dd1fd7417768fa42dfa30e8a7eab93843 | |
parent | a6a42ea881e803995a3103b0af95f75570db9627 (diff) | |
download | syslinux-elf-5b71509662a5b6167f95233c7f0824b4031130b2.tar.gz syslinux-elf-5b71509662a5b6167f95233c7f0824b4031130b2.tar.xz syslinux-elf-5b71509662a5b6167f95233c7f0824b4031130b2.zip |
hdt: dmi> show memory must show the free banks
Show memory have to display the free banks
-rw-r--r-- | com32/hdt/hdt-cli-dmi.c | 8 | ||||
-rw-r--r-- | com32/hdt/hdt-cli.c | 2 | ||||
-rw-r--r-- | com32/hdt/hdt-cli.h | 2 |
3 files changed, 8 insertions, 4 deletions
diff --git a/com32/hdt/hdt-cli-dmi.c b/com32/hdt/hdt-cli-dmi.c index 3981a8d4..287786ff 100644 --- a/com32/hdt/hdt-cli-dmi.c +++ b/com32/hdt/hdt-cli-dmi.c @@ -57,7 +57,7 @@ void dmi_show(char *item, struct s_hardware *hardware) { 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) ) { @@ -288,7 +288,7 @@ void show_dmi_cpu(struct s_hardware *hardware) { } -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)); @@ -307,8 +307,12 @@ void show_dmi_memory_modules(struct s_hardware *hardware, bool clear) { 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"); diff --git a/com32/hdt/hdt-cli.c b/com32/hdt/hdt-cli.c index 25658808..6819471d 100644 --- a/com32/hdt/hdt-cli.c +++ b/com32/hdt/hdt-cli.c @@ -197,7 +197,7 @@ void main_show_summary(struct s_hardware *hardware, struct s_cli_mode *cli_mode) 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) diff --git a/com32/hdt/hdt-cli.h b/com32/hdt/hdt-cli.h index 31a5c0d4..2dcabb51 100644 --- a/com32/hdt/hdt-cli.h +++ b/com32/hdt/hdt-cli.h @@ -84,7 +84,7 @@ void show_dmi_bios(struct s_hardware *hardware); 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); |