summaryrefslogtreecommitdiff
path: root/dmioem.c
diff options
context:
space:
mode:
authorJerry Hoemann <jerry.hoemann@hpe.com>2020-11-30 11:06:21 +0100
committerJean Delvare <jdelvare@suse.de>2020-11-30 11:06:21 +0100
commit59811c74dba20313a9ccbc8316ecb98afeebb1cf (patch)
tree7e0db0817ac7deb0914d833672adcc605468c897 /dmioem.c
parentb0a06e20710c314b12792e831dc0e0676c99c706 (diff)
downloaddmidecode-git-59811c74dba20313a9ccbc8316ecb98afeebb1cf.tar.gz
dmidecode: Some OEM records require Product Name
Decoding of OEM records can depend upon the product in addition to the manufacturer. So, save "Product Name" from type 1 record in addition to "Manufacturer" in dmi_set_vendor. Signed-off-by: Jerry Hoemann <jerry.hoemann@hpe.com> Signed-off-by: Jean Delvare <jdelvare@suse.de>
Diffstat (limited to 'dmioem.c')
-rw-r--r--dmioem.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/dmioem.c b/dmioem.c
index beb3df0..36820e4 100644
--- a/dmioem.c
+++ b/dmioem.c
@@ -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;
}
/*