Blob Blame History Raw
From 23aa50565a65c98fc452ed8ffdffb49b6504941d Mon Sep 17 00:00:00 2001
From: Petr Oros <poros@redhat.com>
Date: Thu, 30 Jun 2016 11:50:30 +0200
Subject: [PATCH 12/12] dmidecode: Unmask LRDIMM in memory type detail

For memory with bit 15 only set, dmidecode would show "None" in type
detail.

Fixes: 0740adaea98a ("Bump release verison to 2.12")
Signed-off-by: Petr Oros <poros@redhat.com>
Signed-off-by: Jean Delvare <jdelvare@suse.de>
---
 AUTHORS     | 1 +
 CHANGELOG   | 4 ++++
 dmidecode.c | 2 +-
 3 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/AUTHORS b/AUTHORS
index ccf7fbb..748b985 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -20,6 +20,7 @@ Anton Arapov <anton@redhat.com>
 Roy Franz <roy.franz@linaro.org>
 Tyler Bell <tyler.bell@hp.com>
 Xie XiuQi <xiexiuqi@huawei.com>
+Petr Oros <poros@redhat.com>
 
 MANY THANKS TO (IN CHRONOLOGICAL ORDER)
 Werner Heuser
diff --git a/CHANGELOG b/CHANGELOG
index ba61cab..ebae4b3 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,7 @@
+2016-06-30  Petr Oros  <poros@redhat.com>
+
+	* dmidecode.c: Unmask LRDIMM in memory type detail (DMI type 17).
+
 2015-11-02  Jean Delvare  <jdelvare@suse.de>
 
 	* dmidecode.c, util.c, util.h: Let read_file return the actual data
diff --git a/dmidecode.c b/dmidecode.c
index 84c18e1..48d9e66 100644
--- a/dmidecode.c
+++ b/dmidecode.c
@@ -2392,7 +2392,7 @@ static void dmi_memory_device_type_detail(u16 code)
 		"LRDIMM"  /* 15 */
 	};
 
-	if ((code & 0x7FFE) == 0)
+	if ((code & 0xFFFE) == 0)
 		printf(" None");
 	else
 	{
-- 
2.7.4