diff options
-rw-r--r-- | dmidecode.c | 4 | ||||
-rw-r--r-- | dmioem.c | 5 | ||||
-rw-r--r-- | dmioem.h | 2 |
3 files changed, 7 insertions, 4 deletions
diff --git a/dmidecode.c b/dmidecode.c index 404c7e1..ac96395 100644 --- a/dmidecode.c +++ b/dmidecode.c @@ -5242,8 +5242,8 @@ static void dmi_table_decode(u8 *buf, u32 len, u16 num, u16 ver, u32 flags) } /* assign vendor for vendor-specific decodes later */ - if (h.type == 1 && h.length >= 5) - dmi_set_vendor(dmi_string(&h, data[0x04])); + if (h.type == 1 && h.length >= 6) + dmi_set_vendor(dmi_string(&h, data[0x04]), dmi_string(&h, data[0x5])); /* Fixup a common mistake */ if (h.type == 34) @@ -42,13 +42,14 @@ enum DMI_VENDORS }; static enum DMI_VENDORS dmi_vendor = VENDOR_UNKNOWN; +static const char *dmi_product = NULL; /* * Remember the system vendor for later use. We only actually store the * value if we know how to decode at least one specific entry type for * that vendor. */ -void dmi_set_vendor(const char *s) +void dmi_set_vendor(const char *s, const char *p) { int len; @@ -70,6 +71,8 @@ void dmi_set_vendor(const char *s) dmi_vendor = VENDOR_IBM; else if (strncmp(s, "LENOVO", len) == 0) dmi_vendor = VENDOR_LENOVO; + + dmi_product = p; } /* @@ -21,5 +21,5 @@ struct dmi_header; -void dmi_set_vendor(const char *s); +void dmi_set_vendor(const char *s, const char *p); int dmi_decode_oem(const struct dmi_header *h); |