diff options
Diffstat (limited to 'src/hardware/dmidecode.h')
-rw-r--r-- | src/hardware/dmidecode.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/hardware/dmidecode.h b/src/hardware/dmidecode.h index 5423c93..76627af 100644 --- a/src/hardware/dmidecode.h +++ b/src/hardware/dmidecode.h @@ -125,6 +125,16 @@ typedef struct _DmiPort { char *port_type; /* Port Type */ } DmiPort; +/* System Slot from dmidecode. */ +typedef struct _DmiSystemSlot { + char *name; /* Name */ + unsigned number; /* Slot number */ + char *type; /* Slot type */ + unsigned data_width; /* Data width */ + char *link_width; /* Link width */ + short supports_hotplug; /* Supports slot hotplug? */ +} DmiSystemSlot; + /* * Get array of processors according to the dmidecode program. * @param cpu array of cpus, this function will allocate necessary memory, @@ -215,5 +225,21 @@ short dmi_get_ports(DmiPort **ports, unsigned *ports_nb); */ void dmi_free_ports(DmiPort **ports, unsigned *ports_nb); +/* + * Get array of system slots according to the dmidecode program. + * @param slots array of slots, this function will allocate necessary memory, + * but caller is responsible for freeing it + * @param slots_nb number of slots + * @return 0 if success, negative value otherwise + */ +short dmi_get_system_slots(DmiSystemSlot **slots, unsigned *slots_nb); + +/* + * Free array of slot structures. + * @param slots array of slots + * @param slots_nb number of slots + */ +void dmi_free_system_slots(DmiSystemSlot **slots, unsigned *slots_nb); + #endif /* DMIDECODE_H_ */ |