Your message dated Wed, 28 Sep 2011 05:02:17 +0000
with message-id <[email protected]>
and subject line Bug#637028: fixed in dmidecode 2.11-2
has caused the Debian Bug report #637028,
regarding dmidecode does falsely use bit 7 when decoding the chassis-type
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
637028: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=637028
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: dmidecode

the bug is present in all vanilla versions since at least 2.9 and in
various Debian-based distributions (Ubuntu, grml). the attached patch
was also sent upstream (and to Ubuntu). for details please see the patch.

-- 
Kind regards/Mit freundlichen Grüßen, Stefan Tauner
From 888158fc7e0c7b9bc33281c2f80c5501f01b304e Mon Sep 17 00:00:00 2001
From: Stefan Tauner <[email protected]>
Date: Sun, 7 Aug 2011 20:24:44 +0200
Subject: [PATCH] Make dmi_chassis_type aware of the lock bit.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
To: [email protected]

Previously all bits of the parameter passed to dmi_chassis_type were
used to derive the chassis type although the 7th bit indicates a
lock and only bits 6:0 encode the chassis type (7.4 System Enclosure
or Chassis (Type 3), offset 05h). This is ok as long as the input is
masked as it was done in dmi_decode, but it was forgotten in
dmi_table_string, resulting in wrong output if there is a lock
present:
dmidecode -s chassis-type
<OUT OF SPEC>
although the normal output is correct:
[…]
Handle 0x0003, DMI type 3, 17 bytes
Chassis Information
	Manufacturer: Chassis Manufacture
	Type: Desktop
	Lock: Present
	[…]

dump (the 5th byte (83) is the interesting one):
dmidecode -t chassis -u
SMBIOS 2.3 present.

Handle 0x0003, DMI type 3, 17 bytes
        Header and Data:
                03 11 03 00 01 83 02 03 04 03 03 03 03 01 00 00
                00

Tested with current CVS code on a "Laptop" without a lock (by me)
and on the "Desktop" board dumped above (by Florian Zumbiehl, thanks!).
---
 dmidecode.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dmidecode.c b/dmidecode.c
index f7b23c1..af2bfc5 100644
--- a/dmidecode.c
+++ b/dmidecode.c
@@ -532,6 +532,7 @@ static const char *dmi_chassis_type(u8 code)
 		"Blade Enclosing" /* 0x1D */
 	};
 
+	code &= 0x7F; /* bits 6:0 are chassis type, 7th bit is the lock bit */
 	if (code >= 0x01 && code <= 0x1D)
 		return type[code - 0x01];
 	return out_of_spec;
@@ -3237,7 +3238,7 @@ static void dmi_decode(const struct dmi_header *h, u16 ver)
 			printf("\tManufacturer: %s\n",
 				dmi_string(h, data[0x04]));
 			printf("\tType: %s\n",
-				dmi_chassis_type(data[0x05] & 0x7F));
+				dmi_chassis_type(data[0x05]));
 			printf("\tLock: %s\n",
 				dmi_chassis_lock(data[0x05] >> 7));
 			printf("\tVersion: %s\n",
-- 
1.7.1


--- End Message ---
--- Begin Message ---
Source: dmidecode
Source-Version: 2.11-2

We believe that the bug you reported is fixed in the latest version of
dmidecode, which is due to be installed in the Debian FTP archive:

dmidecode-udeb_2.11-2_i386.udeb
  to main/d/dmidecode/dmidecode-udeb_2.11-2_i386.udeb
dmidecode_2.11-2.debian.tar.gz
  to main/d/dmidecode/dmidecode_2.11-2.debian.tar.gz
dmidecode_2.11-2.dsc
  to main/d/dmidecode/dmidecode_2.11-2.dsc
dmidecode_2.11-2_i386.deb
  to main/d/dmidecode/dmidecode_2.11-2_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Daniel Baumann <[email protected]> (supplier of updated 
dmidecode package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Wed, 28 Sep 2011 06:42:29 +0200
Source: dmidecode
Binary: dmidecode dmidecode-udeb
Architecture: source i386
Version: 2.11-2
Distribution: unstable
Urgency: low
Maintainer: Daniel Baumann <[email protected]>
Changed-By: Daniel Baumann <[email protected]>
Description: 
 dmidecode  - SMBIOS/DMI table decoder
 dmidecode-udeb - SMBIOS/DMI table decoder (udeb) (udeb)
Closes: 637028
Changes: 
 dmidecode (2.11-2) unstable; urgency=low
 .
   * Adding patch from Stefan Tauner <[email protected]>
     to correctly decode the chassis-type (Closes: #637028).
Checksums-Sha1: 
 b0b2933bad4ce15788c9cac9f1711fea2dfd0be3 1166 dmidecode_2.11-2.dsc
 5437caf80b14678612afc73b43ba8cf125d5c10f 6181 dmidecode_2.11-2.debian.tar.gz
 1a59f7d439a9bcdc571259078c919e2b429a7bb1 69046 dmidecode_2.11-2_i386.deb
 e18954f5ce5ee4623e8f572406b579ddb75853cd 30478 dmidecode-udeb_2.11-2_i386.udeb
Checksums-Sha256: 
 5aee88d8d01de114fee17d8798e46601cf99076a34158f2052a7e18faf0aaa66 1166 
dmidecode_2.11-2.dsc
 a68b18635e401818aadf1abdf8bf2c7addeb5034ef926ed1d7313d979a856924 6181 
dmidecode_2.11-2.debian.tar.gz
 2ed8fa4a72c42d28dfb427e34d09c860db5200166491716e97b3c6835e321fb5 69046 
dmidecode_2.11-2_i386.deb
 25a761a39ce53904753ecc1fb00193236f03a531667ea023ae08232ca73a8e16 30478 
dmidecode-udeb_2.11-2_i386.udeb
Files: 
 1b4fcacbb7cfa39147a933bddad984b2 1166 utils optional dmidecode_2.11-2.dsc
 760d0df1d16c7f6771dbc3622f9283ec 6181 utils optional 
dmidecode_2.11-2.debian.tar.gz
 605675e88aa1c6cfe4142ed111e3b2fb 69046 utils important 
dmidecode_2.11-2_i386.deb
 374333202947802a992cbab31b79cbd7 30478 debian-installer optional 
dmidecode-udeb_2.11-2_i386.udeb
Package-Type: udeb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAk6CpwkACgkQ+C5cwEsrK56vagCdH0RO75ja8aOcVF1shZyBLFUA
0dIAn3zis4GW+wejV3o218yBEIIPqRqX
=LLmy
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to