Originally the highest regular DMI structure type was 39, and non-OEM
types greater than that (including 126/disabled and 127/end-of-table)
wouldn't show up in quiet mode. The limit was not updated when types
40, 41 and then 42 were added to the SMBIOS specification, so these
types do not show up in quiet mode. Fix that.

We could simply raise the limit from 39 to 42, but the fact that this
bug went unnoticed for years is probably a good indication that this
limit was a bad idea in the first place and it is safer to only
explicitly hide types 126 and 127 in quiet mode.
---
 dmidecode.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- dmidecode.orig/dmidecode.c  2015-04-28 13:19:47.873156547 +0200
+++ dmidecode/dmidecode.c       2015-04-28 21:02:50.713344986 +0200
@@ -4379,7 +4379,7 @@ static void dmi_table_decode(u8 *buf, u3
 
                to_dmi_header(&h, data);
                display = ((opt.type == NULL || opt.type[h.type])
-                       && !((opt.flags & FLAG_QUIET) && (h.type > 39 && h.type 
<= 127))
+                       && !((opt.flags & FLAG_QUIET) && (h.type == 126 || 
h.type == 127))
                        && !opt.string);
 
                /*


-- 
Jean Delvare
SUSE L3 Support

_______________________________________________
https://lists.nongnu.org/mailman/listinfo/dmidecode-devel

Reply via email to