summaryrefslogtreecommitdiff
path: root/sys/dev/dmi
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/dmi')
-rw-r--r--sys/dev/dmi/dmi.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/sys/dev/dmi/dmi.c b/sys/dev/dmi/dmi.c
index dc4b363..f9750c1 100644
--- a/sys/dev/dmi/dmi.c
+++ b/sys/dev/dmi/dmi.c
@@ -46,7 +46,8 @@
/* String offsets */
#define BIOSINFO_VENDOR 0x01
#define SYSINFO_PRODUCT 0x02
-#define SYSINFO_FAMILY 0x03
+#define SYSINFO_VERSION 0x03
+#define SYSINFO_FAMILY 0x06
#define PROCINFO_MANUFACT 0x02
#define PROCINFO_VERSION 0x03
#define PROCINFO_PARTNO 0x06
@@ -178,6 +179,24 @@ dmi_prodver(void)
return NULL;
}
+ return dmi_str_index(hdr, SYSINFO_VERSION);
+}
+
+/*
+ * Return the product family from the DMI/SMBIOS
+ * System Info structure
+ *
+ * Returns NULL if not found
+ */
+const char *
+dmi_prodfam(void)
+{
+ struct dmi_shdr *hdr;
+
+ if ((hdr = dmi_shdr(DMI_SYSTEM_INFO)) == NULL) {
+ return NULL;
+ }
+
return dmi_str_index(hdr, SYSINFO_FAMILY);
}