Skip to content

Commit e6ab5bc

Browse files
authored
Merge pull request #46 from HuO50/master
Rebase branch from smbios-3.3.0 to master
2 parents f0a089a + 5fdcb2b commit e6ab5bc

File tree

10 files changed

+1843
-465
lines changed

10 files changed

+1843
-465
lines changed

src/dmidecode.c

Lines changed: 1214 additions & 249 deletions
Large diffs are not rendered by default.

src/dmidecode.h

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,31 @@
2323
#include "dmihelper.h"
2424
#include "dmierror.h"
2525

26+
#define FLAG_NO_FILE_OFFSET (1 << 0)
27+
#define FLAG_STOP_AT_EOT (1 << 1)
28+
29+
#define SYS_FIRMWARE_DIR "/sys/firmware/dmi/tables"
30+
#define SYS_ENTRY_FILE SYS_FIRMWARE_DIR "/smbios_entry_point"
31+
#define SYS_TABLE_FILE SYS_FIRMWARE_DIR "/DMI"
32+
2633
struct dmi_header {
2734
u8 type;
2835
u8 length;
2936
u16 handle;
3037
u8 *data;
3138
};
3239

33-
void dmi_dump(xmlNode *node, struct dmi_header * h);
40+
int is_printable(const u8 *data, int len);
41+
void dmi_dump(xmlNode *node, struct dmi_header *h);
3442
xmlNode *dmi_decode(xmlNode *parent_n, dmi_codes_major *dmiMajor, struct dmi_header * h, u16 ver);
3543
void to_dmi_header(struct dmi_header *h, u8 * data);
3644

45+
xmlNode *smbios3_decode_get_version(u8 * buf, const char *devmem);
3746
xmlNode *smbios_decode_get_version(u8 * buf, const char *devmem);
3847
xmlNode *legacy_decode_get_version(u8 * buf, const char *devmem);
39-
int smbios_decode(Log_t *logp, int type, u8 *buf, const char *devmem, xmlNode *xmlnode);
40-
int legacy_decode(Log_t *logp, int type, u8 *buf, const char *devmem, xmlNode *xmlnode);
48+
int smbios3_decode(Log_t *logp, int type, u8 *buf, const char *devmem, u32 flags, xmlNode *xmlnode);
49+
int smbios_decode(Log_t *logp, int type, u8 *buf, const char *devmem, u32 flags, xmlNode *xmlnode);
50+
int legacy_decode(Log_t *logp, int type, u8 *buf, const char *devmem, u32 flags, xmlNode *xmlnode);
4151

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

0 commit comments

Comments
 (0)