Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
aef6454
Fix reading info permission deny bugs.
HuO50 Sep 3, 2022
a37fc12
Fix bugs: 1. Fix smbios3_decode decoding sysfs table dump error. 2. F…
HuO50 Sep 4, 2022
c97d1ca
Fix the failure of opening "/dev/mem": Permission denied
HuO50 Sep 3, 2022
fbaab92
Fix for printing an empty dictionary
HuO50 Sep 4, 2022
2ff3641
Update python-dmidecode to smbios 3.3.0
HuO50 Sep 7, 2022
6888276
Merge branch 'smbios-3.3.0' into smbios-3.3.0
HuO50 Sep 19, 2022
9416b89
Merge pull request #42 from HuO50/smbios-3.3.0
lian-bo Sep 19, 2022
2f4d895
fix warning argument 1 null where non-null expected
HuO50 Oct 22, 2022
5c2d56c
fix warning: ignoring return value of 'legacy_decode'
HuO50 Oct 22, 2022
163fe6e
fix warning: comparison of integer expressions of different signedness
HuO50 Oct 22, 2022
4b3d528
fix warning: suggest parentheses around '&&' within '||'
HuO50 Oct 22, 2022
b9d8101
fix warning: variable 'eptype' set but not used
HuO50 Oct 22, 2022
168cc81
fix warning: unused variable 'ver'
HuO50 Oct 22, 2022
369c9be
fix warning: passing argument 3 of 'dmi_slot_peers' from incompatible…
HuO50 Oct 22, 2022
e438d91
src/dmidecode.c: In function 'dmi_tpm_characteristics': src/dmidecode…
HuO50 Oct 22, 2022
2e29bf2
fix warning: suggest parentheses around assignment used as truth value
HuO50 Oct 22, 2022
ddc6e0d
fix warning: suggest parentheses around assignment used as truth value
HuO50 Oct 22, 2022
4c547ef
fix warning: unused variable 'addrstr'
HuO50 Oct 22, 2022
6e24d9b
fix warning: unused variable 'attr'
HuO50 Oct 22, 2022
d52d234
fix warning: passing argument 2 of 'dmi_tpm_vendor_id' makes pointer …
HuO50 Oct 22, 2022
a8755ea
fix warning: variable 'str_n' set but not used
HuO50 Oct 22, 2022
b76eadf
fix warning: this 'if' clause does not guard
HuO50 Oct 22, 2022
e7ed843
Merge pull request #1 from nima/smbios-3.3.0
HuO50 Oct 22, 2022
1221d49
Merge pull request #43 from HuO50/smbios-3.3.0
lian-bo Oct 24, 2022
d682a12
fix function dmi_slot_segment_bus_func null point error in system slot
HuO50 Oct 24, 2022
384ae88
Merge branch 'nima:smbios-3.3.0' into smbios-3.3.0
HuO50 Oct 24, 2022
86bc6f8
Merge pull request #45 from HuO50/smbios-3.3.0
lian-bo Oct 26, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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