diff options
Diffstat (limited to 'src/dmioem.c')
-rw-r--r-- | src/dmioem.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/dmioem.c b/src/dmioem.c index 361810a..67cd517 100644 --- a/src/dmioem.c +++ b/src/dmioem.c @@ -40,10 +40,19 @@ static enum DMI_VENDORS dmi_vendor = VENDOR_UNKNOWN; * 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 struct dmi_header *h) { - if(strcmp(s, "HP") == 0) + const char *vendor; + + if( !h || !h->data ) { + return; + } + vendor = dmi_string(h, h->data[0x04]); + if( !vendor ) { + return; + } else if(strcmp(vendor, "HP") == 0) { dmi_vendor = VENDOR_HP; + } } /* |