dmi_onboard_device
Synopsis
#include <opendmi/entity/onboard-device.h>
typedef struct dmi_onboard_device {
size_t instance_count;
dmi_onboard_device_instance_t *instances;
} dmi_onboard_device_t;
Description
The dmi_onboard_device_t structure holds the decoded onboard devices
information structure (type 10) of SMBIOS: a list of the devices soldered
onto a board of the system, usually the baseboard, which the firmware can
enable or disable. A table may have one such structure for all the devices,
or one for each of them.
The structure is obsolete since SMBIOS 2.6: the onboard devices extended
information structure (type 41), see dmi_onboard_device_ex, replaces it,
although firmware may still provide both.
The structure is returned by dmi_entity_info for the structures of type
DMI_TYPE(onboard_device), and lives as long as the context it has been
decoded in.
Fields
instance_count-
Number of devices, told by the length of the structure.
instances-
Array of
instance_countdevices, seedmi_onboard_device_instance.
Examples
dmi_registry_t *registry = dmi_get_registry(context);
dmi_entity_t *entity = dmi_registry_lookup_first(
registry, DMI_TYPE(onboard_device), false);
dmi_onboard_device_t *info = dmi_entity_info(entity,
DMI_TYPE(onboard_device));
for (size_t i = 0; (info != nullptr) && (i < info->instance_count); i++) {
const dmi_onboard_device_instance_t *device = &info->instances[i];
printf("%s (%s)\n",
device->description ? device->description : "Unnamed device",
device->is_enabled ? "enabled" : "disabled");
}