summaryrefslogtreecommitdiffstats
path: root/efi_memtest
diff options
context:
space:
mode:
authorRegia König2021-06-08 16:01:32 +0200
committerRegia König2021-06-08 16:01:32 +0200
commit4e298a1e8929c5e80f1fda21af55544853f7d935 (patch)
tree9df666ccf998d7eeb5c47c869c6094050973d1d9 /efi_memtest
parentSave last state (diff)
downloadmemtest86-4e298a1e8929c5e80f1fda21af55544853f7d935.tar.gz
memtest86-4e298a1e8929c5e80f1fda21af55544853f7d935.tar.xz
memtest86-4e298a1e8929c5e80f1fda21af55544853f7d935.zip
Add condition. Dmi startup info is only printed if dmi opening was successful
Diffstat (limited to 'efi_memtest')
-rw-r--r--efi_memtest/memtest86+/efi/dmi.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/efi_memtest/memtest86+/efi/dmi.c b/efi_memtest/memtest86+/efi/dmi.c
index a2c33c7..1cb602e 100644
--- a/efi_memtest/memtest86+/efi/dmi.c
+++ b/efi_memtest/memtest86+/efi/dmi.c
@@ -224,7 +224,7 @@ int open_dmi(void) {
} else if (abc(&guid, &smbios3)) {
print_log("SMBIOS3_TABLE_GUID", 18);
} else if (abc(&guid, &acpi_10)) {
- print_log("ACPI_10_TABLE_GUID", 22);
+ print_log("ACPI_10_TABLE_GUID", 18);
} else {
print_log("Unknown table-GUID.", 19);
}
@@ -310,7 +310,7 @@ int open_dmi(void) {
return 0;
}*/
-void init_dmi(void){
+int init_dmi(void){
if (logflag) print_log("init_dmi() started", 18);
@@ -318,11 +318,13 @@ void init_dmi(void){
for(i=0; i < MAX_DMI_MEMDEVS; i++)
dmi_err_cnts[i]=0;
- open_dmi();
+ int status = open_dmi();
if (logflag) print_log("Dmi openend.", 12);
dmi_initialized=1;
+
+ return status;
}
void print_dmi_startup_info(void)
@@ -337,9 +339,20 @@ void print_dmi_startup_info(void)
int slength;
int sl1, sl2, sl3;
- if(!dmi_initialized) { init_dmi(); }
+ if(!dmi_initialized) {
+ if (init_dmi() == -1) return;
+ }
+
+ if (logflag) print_log("Dmi initialized.", 16);
if (logflag) print_log("Dmi initialized.", 16);
+
+ if (logflag) {
+ char log[50] = "print_dmi_startup_info(): dmi pointer = ";
+ int length = 40;
+ int_to_charr((ulong)&dmi_system_info, log, &length);
+ print_log(log, length);
+ }
string1 = get_tstruct_string(&dmi_system_info->header,dmi_system_info->manufacturer);
if (logflag) print_log("Dmi initialized.", 16);