aboutsummaryrefslogtreecommitdiff
path: root/hardinfo/dmi_util.c
diff options
context:
space:
mode:
authorBurt P <pburt0@gmail.com>2018-12-02 10:59:47 -0600
committerLeandro A. F. Pereira <leandro@hardinfo.org>2018-12-03 02:29:15 -0800
commit54ece208e2aceb11bddd78d818260ffc692d833a (patch)
tree93697ffc81ad1a7adad4aef6edf148b53d9f42b1 /hardinfo/dmi_util.c
parent4afc76fc1b644d019a0ef0b79b513435fcf81102 (diff)
dmi: add system-serial-number, sku; ignore a few more placeholders
Signed-off-by: Burt P <pburt0@gmail.com>
Diffstat (limited to 'hardinfo/dmi_util.c')
-rw-r--r--hardinfo/dmi_util.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/hardinfo/dmi_util.c b/hardinfo/dmi_util.c
index 86600f27..0a493411 100644
--- a/hardinfo/dmi_util.c
+++ b/hardinfo/dmi_util.c
@@ -31,13 +31,19 @@ static int ignore_placeholder_strings(gchar **pstr) {
return -1;
#define DMI_IGNORE(m) if (strcasecmp(m, *pstr) == 0) { g_free(chk); g_free(*pstr); *pstr = NULL; return 1; }
DMI_IGNORE("To be filled by O.E.M.");
+ DMI_IGNORE("Default String");
DMI_IGNORE("System Product Name");
DMI_IGNORE("System Manufacturer");
DMI_IGNORE("System Version");
- DMI_IGNORE("Default String");
+ DMI_IGNORE("System Serial Number");
DMI_IGNORE("Rev X.0x"); /* ASUS board version nonsense */
DMI_IGNORE("x.x"); /* Gigabyte board version nonsense */
DMI_IGNORE("NA");
+ DMI_IGNORE("SKU");
+
+ /* noticed on an HP x360 */
+ DMI_IGNORE("Type2 - Board Asset Tag");
+ DMI_IGNORE("Type1ProductConfigId");
/* Zotac version nonsense */
p = chk;
@@ -113,6 +119,7 @@ char *dmi_get_str_abs(const char *id_str) {
{ "system-product-family", "id/product_family" },
{ "system-version", "id/product_version" },
{ "system-uuid", "product_uuid" },
+ { "system-sku", "id/product_sku" }, /*dmidecode doesn't actually support this one*/
{ "chassis-type", "id/chassis_type" },
{ "chassis-serial-number", "id/chassis_serial" },
{ "chassis-manufacturer", "id/chassis_vendor" },