[syslinux:master] hdt: Dumping oem & security items

syslinux-bot for Erwan Velu erwanaliasr1 at gmail.com
Mon Apr 25 15:28:31 PDT 2011


Commit-ID:  72139f9f6ac2aa5c449d74ae6bf179dc53be396f
Gitweb:     http://syslinux.zytor.com/commit/72139f9f6ac2aa5c449d74ae6bf179dc53be396f
Author:     Erwan Velu <erwanaliasr1 at gmail.com>
AuthorDate: Tue, 29 Mar 2011 22:30:07 +0200
Committer:  Erwan Velu <erwanaliasr1 at gmail.com>
CommitDate: Tue, 29 Mar 2011 22:30:07 +0200

hdt: Dumping oem & security items



---
 com32/hdt/hdt-dump-dmi.c |   30 ++++++++++++++++++++++++++++++
 1 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/com32/hdt/hdt-dump-dmi.c b/com32/hdt/hdt-dump-dmi.c
index 1424437..2e87666 100644
--- a/com32/hdt/hdt-dump-dmi.c
+++ b/com32/hdt/hdt-dump-dmi.c
@@ -29,6 +29,34 @@
 #include "hdt-common.h"
 #include "hdt-dump.h"
 
+void dump_hardware_security(struct s_hardware *hardware, ZZJSON_CONFIG *config, ZZJSON **item) {
+	if (!hardware->dmi.hardware_security.filled) {
+			APPEND_ARRAY
+				add_as("dmi.warning","No hardware security structure found")
+			END_OF_APPEND;
+			return;
+	}
+	
+	APPEND_ARRAY
+		add_ahs(dmi.hardware_security.power_on_passwd_status)
+		add_ahs(dmi.hardware_security.keyboard_passwd_status)
+		add_ahs(dmi.hardware_security.administrator_passwd_status)
+		add_ahs(dmi.hardware_security.front_panel_reset_status)
+	END_OF_APPEND;
+}
+
+void dump_oem_strings(struct s_hardware *hardware, ZZJSON_CONFIG *config, ZZJSON **item) {
+	if (strlen(hardware->dmi.oem_strings) == 0) {
+			APPEND_ARRAY
+				add_as("dmi.warning","No oem structure found")
+			END_OF_APPEND;
+			return;
+	}
+	APPEND_ARRAY
+		add_ahs(dmi.oem_strings)
+	END_OF_APPEND;
+}
+
 void dump_memory_size(struct s_hardware *hardware, ZZJSON_CONFIG *config, ZZJSON **item) {
 	APPEND_ARRAY
 		add_ai("dmi.memory_size (KB)",hardware->detected_memory_size)
@@ -418,6 +446,8 @@ void dump_dmi(struct s_hardware *hardware, ZZJSON_CONFIG *config, ZZJSON **item)
 	dump_memory_banks(hardware,config,item);
 	dump_memory_modules(hardware,config,item);
 	dump_memory_size(hardware,config,item);
+	dump_oem_strings(hardware,config,item);
+	dump_hardware_security(hardware,config,item);
 exit:
 	flush("dmi",config,item);
 }



More information about the Syslinux-commits mailing list