aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firmware
diff options
context:
space:
mode:
authorAlok Kataria <akataria@vmware.com>2008-11-03 18:50:38 -0500
committerH. Peter Anvin <hpa@zytor.com>2008-11-04 16:59:00 -0500
commitfd8cd7e1919fc1c27fe2fdccd2a1cd32f791ef0f (patch)
treeb2b1482133a10f8de3d8c85a1a291fd93ead4b2c /drivers/firmware
parent6bdbfe99916398dbb28d83833cc04757110f2738 (diff)
x86: vmware: look for DMI string in the product serial key
Impact: Should permit VMware detection on older platforms where the vendor is changed. Could theoretically cause a regression if some weird serial number scheme contains the string "VMware" by pure chance. Seems unlikely, especially with the mixed case. In some user configured cases, VMware may choose not to put a VMware specific DMI string, but the product serial key is always there and is VMware specific. Add a interface to check the serial key, when checking for VMware in the DMI information. Signed-off-by: Alok N Kataria <akataria@vmware.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'drivers/firmware')
-rw-r--r--drivers/firmware/dmi_scan.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c
index 3e526b6d00cb..d66d41282907 100644
--- a/drivers/firmware/dmi_scan.c
+++ b/drivers/firmware/dmi_scan.c
@@ -467,6 +467,17 @@ const char *dmi_get_system_info(int field)
467} 467}
468EXPORT_SYMBOL(dmi_get_system_info); 468EXPORT_SYMBOL(dmi_get_system_info);
469 469
470/**
471 * dmi_name_in_serial - Check if string is in the DMI product serial
472 * information.
473 */
474int dmi_name_in_serial(const char *str)
475{
476 int f = DMI_PRODUCT_SERIAL;
477 if (dmi_ident[f] && strstr(dmi_ident[f], str))
478 return 1;
479 return 0;
480}
470 481
471/** 482/**
472 * dmi_name_in_vendors - Check if string is anywhere in the DMI vendor information. 483 * dmi_name_in_vendors - Check if string is anywhere in the DMI vendor information.