aboutsummaryrefslogtreecommitdiffstats
path: root/com32/hdt
diff options
context:
space:
mode:
authorErwan Velu <erwanaliasr1@gmail.com>2011-03-29 21:39:00 +0200
committerErwan Velu <erwanaliasr1@gmail.com>2011-03-29 21:39:00 +0200
commit3c7edc827704b44886a6d2a74e690513f44f24d0 (patch)
tree560793d5f3e59063d8727742595330c3489af4c8 /com32/hdt
parent63a92391288bd4fe449467a47f538991d5964c27 (diff)
downloadsyslinux-3c7edc827704b44886a6d2a74e690513f44f24d0.tar.gz
syslinux-3c7edc827704b44886a6d2a74e690513f44f24d0.tar.xz
syslinux-3c7edc827704b44886a6d2a74e690513f44f24d0.zip
hdt: Improving base_board dump
Some items were missing
Diffstat (limited to 'com32/hdt')
-rw-r--r--com32/hdt/hdt-dump-dmi.c35
1 files changed, 25 insertions, 10 deletions
diff --git a/com32/hdt/hdt-dump-dmi.c b/com32/hdt/hdt-dump-dmi.c
index 9bebb972..f348b9b9 100644
--- a/com32/hdt/hdt-dump-dmi.c
+++ b/com32/hdt/hdt-dump-dmi.c
@@ -294,16 +294,31 @@ void dump_base_board(struct s_hardware *hardware, ZZJSON_CONFIG *config, ZZJSON
return;
}
- APPEND_ARRAY
- add_as("dmi.item","base_board")
- add_ahs(dmi.base_board.manufacturer)
- add_ahs(dmi.base_board.product_name)
- add_ahs(dmi.base_board.version)
- add_ahs(dmi.base_board.serial)
- add_ahs(dmi.base_board.asset_tag)
- add_ahs(dmi.base_board.location)
- add_ahs(dmi.base_board.type)
- END_OF_APPEND;
+ CREATE_TEMP_OBJECT;
+ add_ts("dmi.item","base_board");
+ add_ths(dmi.base_board.manufacturer);
+ add_ths(dmi.base_board.product_name);
+ add_ths(dmi.base_board.version);
+ add_ths(dmi.base_board.serial);
+ add_ths(dmi.base_board.asset_tag);
+ add_ths(dmi.base_board.location);
+ add_ths(dmi.base_board.type);
+ for (int i = 0; i < BASE_BOARD_NB_ELEMENTS; i++) {
+ if (((bool *) (&hardware->dmi.base_board.features))[i] == true) {
+ add_ts("dmi.base_board.features",(char *)base_board_features_strings[i]);
+ }
+ }
+
+ for (unsigned int i = 0; i < sizeof hardware->dmi.base_board.devices_information /
+ sizeof *hardware->dmi.base_board.devices_information; i++) {
+ if (strlen(hardware->dmi.base_board.devices_information[i].type)) {
+ add_ts("dmi.base_board.devices_information.type", hardware->dmi.base_board.devices_information[i].type);
+ add_ti("dmi.base_board.devices_information.status", hardware->dmi.base_board.devices_information[i].status);
+ add_ts("dmi.base_board.devices_information.description", hardware->dmi.base_board.devices_information[i].description);
+ }
+ }
+
+ APPEND_TEMP_OBJECT_ARRAY;
}