dmi_oem_strings
Synopsis
#include <opendmi/entity/oem-strings.h>
typedef struct dmi_oem_strings {
size_t string_count;
const char **strings;
} dmi_oem_strings_t;
Description
The dmi_oem_strings_t structure holds the decoded OEM strings structure
(type 11) of SMBIOS: free-form strings defined by the OEM, such as part
numbers of reference documents or contact information of the manufacturer.
The structure is returned by dmi_entity_info for the structures of type
DMI_TYPE(oem_strings), and lives as long as the context it has been decoded
in.
Examples
dmi_registry_t *registry = dmi_get_registry(context);
dmi_entity_t *entity = dmi_registry_lookup_first(registry,
DMI_TYPE(oem_strings), false);
dmi_oem_strings_t *oem = dmi_entity_info(entity,
DMI_TYPE(oem_strings));
if (oem != nullptr) {
for (size_t i = 0; i < oem->string_count; i++)
printf("%zu: %s\n", i + 1, oem->strings[i] ? oem->strings[i] : "");
}