[PATCH 02/10] dmicheck: remove duplicated chassis type test in type 3
Alex Hung
alex.hung at canonical.com
Thu May 21 02:37:54 UTC 2020
Signed-off-by: Alex Hung <alex.hung at canonical.com>
---
src/dmi/dmicheck/dmicheck.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/src/dmi/dmicheck/dmicheck.c b/src/dmi/dmicheck/dmicheck.c
index 46d7e620..f163c253 100644
--- a/src/dmi/dmicheck/dmicheck.c
+++ b/src/dmi/dmicheck/dmicheck.c
@@ -1270,16 +1270,7 @@ static void dmicheck_entry(fwts_framework *fw,
if (hdr->length < 0x09)
break;
dmi_str_check(fw, table, addr, "Manufacturer", hdr, 0x4);
- dmi_min_max_mask_uint8_check(fw, table, addr, "Chassis Type", hdr, 0x5, 0x1, 0x24, 0x0, 0x7f);
-
- if ((data[5] & ~0x80) >= FWTS_SMBIOS_CHASSIS_MAX) {
- fwts_failed(fw, LOG_LEVEL_HIGH, DMI_INVALID_HARDWARE_ENTRY,
- "Incorrect Chassis Type "
- "SMBIOS Type 3 reports 0x%" PRIx8,
- (data[5] & ~0x80));
- break;
- }
-
+ dmi_min_max_mask_uint8_check(fw, table, addr, "Chassis Type", hdr, 0x5, 0x1, FWTS_SMBIOS_CHASSIS_MAX - 1, 0x0, 0x7f);
dmi_min_max_mask_uint8_check(fw, table, addr, "Chassis Lock", hdr, 0x5, 0x0, 0x1, 0x7, 0x1);
dmi_str_check(fw, table, addr, "Version", hdr, 0x6);
dmi_str_check(fw, table, addr, "Serial Number", hdr, 0x7);
--
2.25.1
More information about the fwts-devel
mailing list