fu-smbios

fu-smbios

Functions

FuSmbios * fu_smbios_new ()
gchar * fu_smbios_to_string ()
const gchar * fu_smbios_get_string ()
GBytes * fu_smbios_get_data ()

Types and Values

Description

Functions

fu_smbios_new ()

FuSmbios *
fu_smbios_new (void);

Creates a new object to parse SMBIOS data.

Returns

a FuSmbios

Since: 1.0.0


fu_smbios_to_string ()

gchar *
fu_smbios_to_string (FuSmbios *self);

Dumps the parsed SMBIOS data to a string.

Parameters

self

A FuSmbios

 

Returns

a UTF-8 string

Since: 1.0.0


fu_smbios_get_string ()

const gchar *
fu_smbios_get_string (FuSmbios *self,
                      guint8 type,
                      guint8 offset,
                      GError **error);

Reads a string from the SMBIOS string table of a specific structure.

The type and offset can be referenced from the DMTF SMBIOS specification: https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.1.1.pdf

Parameters

self

A FuSmbios

 

type

A structure type, e.g. FU_SMBIOS_STRUCTURE_TYPE_BIOS

 

offset

A structure offset

 

error

A GError or NULL

 

Returns

a string, or NULL if invalid or not found

Since: 1.0.0


fu_smbios_get_data ()

GBytes *
fu_smbios_get_data (FuSmbios *self,
                    guint8 type,
                    GError **error);

Reads a SMBIOS data blob, which includes the SMBIOS section header.

Parameters

self

A FuSmbios

 

type

A structure type, e.g. FU_SMBIOS_STRUCTURE_TYPE_BIOS

 

error

A GError or NULL

 

Returns

a GBytes, or NULL if invalid or not found.

[transfer full]

Since: 1.0.0

Types and Values

FU_TYPE_SMBIOS

#define FU_TYPE_SMBIOS (fu_smbios_get_type ())

FU_SMBIOS_STRUCTURE_TYPE_BIOS

#define FU_SMBIOS_STRUCTURE_TYPE_BIOS		0x00

FU_SMBIOS_STRUCTURE_TYPE_SYSTEM

#define FU_SMBIOS_STRUCTURE_TYPE_SYSTEM		0x01

FU_SMBIOS_STRUCTURE_TYPE_BASEBOARD

#define FU_SMBIOS_STRUCTURE_TYPE_BASEBOARD 0x02

FU_SMBIOS_STRUCTURE_TYPE_CHASSIS

#define FU_SMBIOS_STRUCTURE_TYPE_CHASSIS 0x03

FuSmbios

typedef struct _FuSmbios FuSmbios;