[smbios] Provide SMBIOS version number via smbios_version()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2013-03-20 00:12:30 +00:00
parent 2ec0c1ea48
commit 4f742bcd95
4 changed files with 33 additions and 0 deletions

View File

@@ -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;
}