dmi_firmware_version_format

Synopsis

#include <opendmi/entity/firmware-inventory.h>

typedef enum dmi_firmware_version_format {
    DMI_FIRMWARE_VERSION_FORMAT_FREE     = 0x00,
    DMI_FIRMWARE_VERSION_FORMAT_SEMANTIC = 0x01,
    DMI_FIRMWARE_VERSION_FORMAT_HEX_32   = 0x02,
    DMI_FIRMWARE_VERSION_FORMAT_HEX_64   = 0x03,
} dmi_firmware_version_format_t;

const char *dmi_firmware_version_format_name(
        dmi_firmware_version_format_t value);

Description

The dmi_firmware_version_format_t enumeration tells how the version of a firmware is written, and is the type of the version_format field of dmi_firmware_inventory_t and of the format field of dmi_firmware_version_t. Values 0x04 to 0x7F are reserved by the specification, and values 0x80 to 0xFF are for firmware vendors and OEMs; the enumeration has no constants for them.

The dmi_firmware_version_format_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_FIRMWARE_VERSION_FORMAT_FREE

Free-form string, whose meaning depends on the implementation, for example "1.45.455b66-rev4".

DMI_FIRMWARE_VERSION_FORMAT_SEMANTIC

Major and minor version numbers in decimal, separated by a dot, for example "1.45".

DMI_FIRMWARE_VERSION_FORMAT_HEX_32

Numeric value of 32 bits, written in hexadecimal the way C does: "0x" followed by 8 digits, for example "0x0001002d".

DMI_FIRMWARE_VERSION_FORMAT_HEX_64

Numeric value of 64 bits, written in hexadecimal the way C does: "0x" followed by 16 digits, for example "0x000000010000002d".

Return value

dmi_firmware_version_format_name returns the name of the value, or nullptr if the value has no name. Values 0x04 to 0x7F are named "Reserved", and values 0x80 to 0xFF "Vendor/OEM-specific". The name is a static string, which must not be modified or freed.

Errors

None.

Standards

DMTF SMBIOS Specification (DSP0134), version 3.5 or newer.