dmi_status
Synopsis
#include <opendmi/entity/common.h>
typedef enum dmi_status {
DMI_STATUS_UNSPEC = 0x00,
DMI_STATUS_OTHER = 0x01,
DMI_STATUS_UNKNOWN = 0x02,
DMI_STATUS_OK = 0x03,
DMI_STATUS_NON_CRITICAL = 0x04,
DMI_STATUS_CRITICAL = 0x05,
DMI_STATUS_NON_RECOVERABLE = 0x06,
} dmi_status_t;
const char *dmi_status_name(dmi_status_t value);
Description
The dmi_status_t enumeration tells the health of a hardware component, as the
firmware saw it. It is shared by several structures: it is the type of the
bootup_state, power_supply_state and thermal_state fields of
dmi_chassis_t, and of the status fields of dmi_probe_t (voltage,
temperature and electrical current probes), dmi_cooling_device_t and
dmi_power_supply_t.
The structures describing a system enclosure call the OK and Non-critical
values Safe and Warning respectively; the values are the same.
The dmi_status_name function returns the printable name of a value, as the
command line tool shows it. The name is translated to the locale set with
dmi_set_locale, when the library is built with ICU4C support and has a
translation of it.
Values
DMI_STATUS_UNSPEC-
Unspecified: the data carries no status.
DMI_STATUS_OTHER-
Other status.
DMI_STATUS_UNKNOWN-
Unknown status.
DMI_STATUS_OK-
The component works normally (safe).
DMI_STATUS_NON_CRITICAL-
The component works, but something needs attention (warning).
DMI_STATUS_CRITICAL-
The component is in a critical state.
DMI_STATUS_NON_RECOVERABLE-
The component has failed and cannot recover.
Return value
dmi_status_name returns the name of the value, or nullptr if the value has
no name. The name is a static string, which must not be modified or freed.