summaryrefslogtreecommitdiffstats
path: root/src/interface/smbios
diff options
context:
space:
mode:
Diffstat (limited to 'src/interface/smbios')
-rw-r--r--src/interface/smbios/smbios.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/interface/smbios/smbios.c b/src/interface/smbios/smbios.c
index 8ed24dd66..2adaa53d9 100644
--- a/src/interface/smbios/smbios.c
+++ b/src/interface/smbios/smbios.c
@@ -179,3 +179,20 @@ int read_smbios_string ( struct smbios_structure *structure,
DBG ( "SMBIOS string index %d not found\n", index );
return -ENOENT;
}
+
+/**
+ * Get SMBIOS version
+ *
+ * @ret version Version, or negative error
+ */
+int smbios_version ( void ) {
+ int rc;
+
+ /* Find SMBIOS */
+ if ( ( smbios.address == UNULL ) &&
+ ( ( rc = find_smbios ( &smbios ) ) != 0 ) )
+ return rc;
+ assert ( smbios.address != UNULL );
+
+ return smbios.version;
+}