summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkhali <khali>2009-04-30 08:19:37 +0000
committerkhali <khali>2009-04-30 08:19:37 +0000
commit5cff90ab83c3b5c8cc7c60cb547d1f3b6fb2b641 (patch)
treee4b7662ec2db770462483db96ceb8c66845370d8
parentb73c85dc67109e807195b07e61fda4becabd75c1 (diff)
downloaddmidecode-5cff90ab83c3b5c8cc7c60cb547d1f3b6fb2b641.tar.gz
Warn if decoding an SMBIOS implementation which is newer than what we
support.
-rw-r--r--CHANGELOG5
-rw-r--r--dmidecode.c9
2 files changed, 14 insertions, 0 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 351c6c5..906e8ca 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -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);