mirror of
https://github.com/ipxe/ipxe
synced 2025-12-30 13:11:11 +03:00
[smbios] Provide SMBIOS version number via smbios_version()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -148,8 +148,19 @@ struct smbios {
|
||||
size_t len;
|
||||
/** Number of SMBIOS structures */
|
||||
unsigned int count;
|
||||
/** SMBIOS version */
|
||||
uint16_t version;
|
||||
};
|
||||
|
||||
/**
|
||||
* Calculate SMBIOS version
|
||||
*
|
||||
* @v major Major version
|
||||
* @v minor Minor version
|
||||
* @ret version SMBIOS version
|
||||
*/
|
||||
#define SMBIOS_VERSION( major, minor ) ( ( (major) << 8 ) | (minor) )
|
||||
|
||||
extern int find_smbios ( struct smbios *smbios );
|
||||
extern int find_smbios_structure ( unsigned int type,
|
||||
struct smbios_structure *structure );
|
||||
@@ -158,5 +169,6 @@ extern int read_smbios_structure ( struct smbios_structure *structure,
|
||||
extern int read_smbios_string ( struct smbios_structure *structure,
|
||||
unsigned int index,
|
||||
void *data, size_t len );
|
||||
extern int smbios_version ( void );
|
||||
|
||||
#endif /* _IPXE_SMBIOS_H */
|
||||
|
||||
Reference in New Issue
Block a user