Context lifetime, backend selection, and SMBIOS data loading. More...
Data Structures | |
| struct | lazybiosCTX_t |
| Top-level lazybios context containing raw and parsed SMBIOS data. More... | |
Enumerations | |
| enum | lazybiosBackend_t { LAZYBIOS_BACKEND_LINUX , LAZYBIOS_BACKEND_WINDOWS , LAZYBIOS_BACKEND_MACOS , LAZYBIOS_BACKEND_OPENBSD , LAZYBIOS_BACKEND_FREEBSD , LAZYBIOS_BACKEND_NETBSD , LAZYBIOS_BACKEND_SUNOS , LAZYBIOS_BACKEND_DRAGONFLY , LAZYBIOS_BACKEND_HAIKU , LAZYBIOS_BACKEND_BEOS , LAZYBIOS_BACKEND_REACTOS , LAZYBIOS_BACKEND_GENERIC , LAZYBIOS_BACKEND_UNKNOWN , LAZYBIOS_BACKEND_QNX , LAZYBIOS_BACKEND_MINIX } |
| Selects the platform backend used to obtain SMBIOS data. More... | |
Functions | |
| int | lazybiosCleanup (lazybiosCTX_t *ctx) |
| Releases a context and all SMBIOS data owned by it. | |
| LAZYBIOS_WARN_UNUSED lazybiosCTX_t * | lazybiosCTXNew (void) |
| Allocates and initializes a lazybios context. | |
| LAZYBIOS_WARN_UNUSED int | lazybiosInit (lazybiosCTX_t *ctx, const char *entry_point, const char *DMI_BIN) |
| Loads SMBIOS data from the host system or from captured table files. | |
Context lifetime, backend selection, and SMBIOS data loading.
| enum lazybiosBackend_t |
#include <lazybios.h>
Selects the platform backend used to obtain SMBIOS data.
Definition at line 42 of file lazybios.h.
| int lazybiosCleanup | ( | lazybiosCTX_t * | ctx | ) |
#include <lazybios.h>
Releases a context and all SMBIOS data owned by it.
| ctx | Context to release. |
References lazybiosCleanup().
Referenced by lazybiosCleanup().
| LAZYBIOS_WARN_UNUSED lazybiosCTX_t * lazybiosCTXNew | ( | void | ) |
#include <lazybios.h>
Allocates and initializes a lazybios context.
References LAZYBIOS_WARN_UNUSED, and lazybiosCTXNew().
Referenced by lazybiosCTXNew().
| LAZYBIOS_WARN_UNUSED int lazybiosInit | ( | lazybiosCTX_t * | ctx, |
| const char * | entry_point, | ||
| const char * | DMI_BIN ) |
#include <lazybios.h>
Loads SMBIOS data from the host system or from captured table files.
The two path arguments select the input mode:
entry_point | DMI_BIN | Source |
|---|---|---|
| NULL | NULL | the host system, through the context's backend |
| NULL | path | one merged file holding the entry point and table |
| path | path | separate raw entry-point and DMI-table files |
Supplying an entry point without a table is rejected, because the entry point alone describes nothing to parse.
On success the context owns copies of both buffers and its type index is built. A failed load must not be followed by a structure getter; release the context with lazybiosCleanup instead.
| ctx | Context that receives the raw entry point and DMI table data. |
| entry_point | Path to a raw SMBIOS entry-point file, or NULL. |
| DMI_BIN | Path to a raw DMI table or merged dump file, or NULL for the host. |
References LAZYBIOS_WARN_UNUSED, and lazybiosInit().
Referenced by lazybiosInit().