diff options
author | khali <khali> | 2009-04-30 08:19:37 +0000 |
---|---|---|
committer | khali <khali> | 2009-04-30 08:19:37 +0000 |
commit | 5cff90ab83c3b5c8cc7c60cb547d1f3b6fb2b641 (patch) | |
tree | e4b7662ec2db770462483db96ceb8c66845370d8 | |
parent | b73c85dc67109e807195b07e61fda4becabd75c1 (diff) | |
download | dmidecode-5cff90ab83c3b5c8cc7c60cb547d1f3b6fb2b641.tar.gz |
Warn if decoding an SMBIOS implementation which is newer than what we
support.
-rw-r--r-- | CHANGELOG | 5 | ||||
-rw-r--r-- | dmidecode.c | 9 |
2 files changed, 14 insertions, 0 deletions
@@ -1,3 +1,8 @@ +2009-04-30 Jean Delvare <khali@linux-fr.org> + + * dmidecode.c: Warn if decoding an SMBIOS implementation which is + newer than what we support. + 2009-04-04 Jean Delvare <khali@linux-fr.org> * Makefile: Clarify license. diff --git a/dmidecode.c b/dmidecode.c index ada907c..d55bc63 100644 --- a/dmidecode.c +++ b/dmidecode.c @@ -66,6 +66,8 @@ #define out_of_spec "<OUT OF SPEC>" static const char *bad_index = "<BAD INDEX>"; +#define SUPPORTED_SMBIOS_VER 0x0206 + /* * Type-independant Stuff */ @@ -4005,6 +4007,13 @@ static void dmi_table(u32 base, u16 len, u16 num, u16 ver, const char *devmem) u8 *data; int i = 0; + if (ver > SUPPORTED_SMBIOS_VER) + { + printf("# SMBIOS implementations newer than version %u.%u are not\n" + "# fully supported by this version of dmidecode.\n", + SUPPORTED_SMBIOS_VER >> 8, SUPPORTED_SMBIOS_VER & 0xFF); + } + if (opt.flags & FLAG_DUMP_BIN) { dmi_table_dump(base, len, devmem); |