diff options
Diffstat (limited to 'src/hardware/dmidecode.h')
-rw-r--r-- | src/hardware/dmidecode.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/hardware/dmidecode.h b/src/hardware/dmidecode.h index d838cf5..0fe546c 100644 --- a/src/hardware/dmidecode.h +++ b/src/hardware/dmidecode.h @@ -91,6 +91,17 @@ typedef struct _DmiMemory { unsigned modules_nb; /* Number of Memory Modules */ } DmiMemory; +/* Chassis from dmidecode. */ +typedef struct _DmiChassis { + char *serial_number; /* Chassis serial number */ + char *type; /* Chassis Type */ + char *manufacturer; /* Chassis Manufacturer */ + char *sku_number; /* Chassis SKU number */ + char *version; /* Chassis Version */ + short has_lock; /* Has chassis lock? 0 or 1 */ + unsigned power_cords; /* Number of Power Cords */ +} DmiChassis; + /* * Get array of processors according to the dmidecode program. * @param cpu array of cpus, this function will allocate necessary memory, @@ -137,5 +148,19 @@ short dmi_get_memory(DmiMemory *memory); */ void dmi_free_memory(DmiMemory *memory); +/* + * Get chassis structure according to the dmidecode program. + * @param chassis structure, this function will allocate + * necessary memory, but caller is responsible for freeing it + * @return 0 if success, negative value otherwise + */ +short dmi_get_chassis(DmiChassis *chassis); + +/* + * Free chassis structure. + * @param chassis structure + */ +void dmi_free_chassis(DmiChassis *chassis); + #endif /* DMIDECODE_H_ */ |