dmi_system_boot
Synopsis
#include <opendmi/entity/system-boot.h>
typedef struct dmi_system_boot {
dmi_boot_status_t status;
dmi_binary_t status_data;
bool has_status_data;
} dmi_system_boot_t;
Description
The dmi_system_boot_t structure holds the decoded system boot information
structure (type 32) of SMBIOS: the reason of the last boot of the system,
which the firmware passes to the boot image, for example of a PXE boot, or to
management software. A boot image may use it, for example, to run
diagnostics after a hardware failure.
The structure is returned by dmi_entity_info for the structures of type
DMI_TYPE(system_boot), and lives as long as the context it has been decoded
in.
Fields
status-
Boot status code, see
dmi_boot_status. status_data-
Bytes following the status code up to the end of the structure, as stored. Empty if there are none.
has_status_data-
trueif the status code is vendor-specific or product-specific (0x80 and above), whose additional data the vendor defines. The command line tool only showsstatus_datathen.
Examples
dmi_registry_t *registry = dmi_get_registry(context);
dmi_entity_t *entity = dmi_registry_lookup_first(
registry, DMI_TYPE(system_boot), true);
dmi_system_boot_t *boot = dmi_entity_info(entity, DMI_TYPE(system_boot));
if ((boot != nullptr) && (boot->status != DMI_BOOT_STATUS_NO_ERRORS_DETECTED))
printf("Boot status: 0x%02X\n", (unsigned)boot->status);