Skip to content

Commit

Permalink
Merge pull request #46 from HuO50/master
Browse files Browse the repository at this point in the history
Rebase branch from smbios-3.3.0 to master
  • Loading branch information
lian-bo authored Oct 26, 2022
2 parents f0a089a + 5fdcb2b commit e6ab5bc
Show file tree
Hide file tree
Showing 10 changed files with 1,843 additions and 465 deletions.
1,463 changes: 1,214 additions & 249 deletions src/dmidecode.c

Large diffs are not rendered by default.

16 changes: 13 additions & 3 deletions src/dmidecode.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,31 @@
#include "dmihelper.h"
#include "dmierror.h"

#define FLAG_NO_FILE_OFFSET (1 << 0)
#define FLAG_STOP_AT_EOT (1 << 1)

#define SYS_FIRMWARE_DIR "/sys/firmware/dmi/tables"
#define SYS_ENTRY_FILE SYS_FIRMWARE_DIR "/smbios_entry_point"
#define SYS_TABLE_FILE SYS_FIRMWARE_DIR "/DMI"

struct dmi_header {
u8 type;
u8 length;
u16 handle;
u8 *data;
};

void dmi_dump(xmlNode *node, struct dmi_header * h);
int is_printable(const u8 *data, int len);
void dmi_dump(xmlNode *node, struct dmi_header *h);
xmlNode *dmi_decode(xmlNode *parent_n, dmi_codes_major *dmiMajor, struct dmi_header * h, u16 ver);
void to_dmi_header(struct dmi_header *h, u8 * data);

xmlNode *smbios3_decode_get_version(u8 * buf, const char *devmem);
xmlNode *smbios_decode_get_version(u8 * buf, const char *devmem);
xmlNode *legacy_decode_get_version(u8 * buf, const char *devmem);
int smbios_decode(Log_t *logp, int type, u8 *buf, const char *devmem, xmlNode *xmlnode);
int legacy_decode(Log_t *logp, int type, u8 *buf, const char *devmem, xmlNode *xmlnode);
int smbios3_decode(Log_t *logp, int type, u8 *buf, const char *devmem, u32 flags, xmlNode *xmlnode);
int smbios_decode(Log_t *logp, int type, u8 *buf, const char *devmem, u32 flags, xmlNode *xmlnode);
int legacy_decode(Log_t *logp, int type, u8 *buf, const char *devmem, u32 flags, xmlNode *xmlnode);

const char *dmi_string(const struct dmi_header *dm, u8 s);
void dmi_system_uuid(xmlNode *node, const u8 * p, u16 ver);
Expand Down
Loading

0 comments on commit e6ab5bc

Please sign in to comment.