[PATCH] dmicheck: fix mistakes in error messages for SMBIOS type 9

Alex Hung alex.hung at canonical.com
Wed Jan 25 14:51:39 UTC 2017


The if-condition is updated for SMBIOS 3.0, but the error messages
were not updated. There is also a tailing "x" needs fixing.

Signed-off-by: Alex Hung <alex.hung at canonical.com>
---
 src/dmi/dmicheck/dmicheck.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/dmi/dmicheck/dmicheck.c b/src/dmi/dmicheck/dmicheck.c
index 84d931e..555249a 100644
--- a/src/dmi/dmicheck/dmicheck.c
+++ b/src/dmi/dmicheck/dmicheck.c
@@ -1201,10 +1201,10 @@ static void dmicheck_entry(fwts_framework *fw,
 			if (!(((data[0x5] >= 0x01) && (data[0x5] <= 0x20)) ||
 			      ((data[0x5] >= 0xa0) && (data[0x5] <= 0xb6))))
 				fwts_failed(fw, LOG_LEVEL_HIGH, DMI_VALUE_OUT_OF_RANGE,
-					"Out of range value 0x%2.2x" PRIx8 " "
-					"(range allowed 0x01..0x08, 0xa0..0xa2) "
+					"Out of range value 0x%2.2" PRIx8 " "
+					"(range allowed 0x01..0x20, 0xa0..0xb6) "
 					"while accessing entry '%s' @ 0x%8.8" PRIx32 ", "
-					"field '%s', offset 0x%2.2x",
+					"field '%s', offset 0x%2.2",
 					data[0x5], table, addr, "Slot Type", 0x5);
 			dmi_min_max_uint8_check(fw, table, addr, "Slot Data Bus Width", hdr, 0x6, 0x1, 0xe);
 			dmi_min_max_uint8_check(fw, table, addr, "Current Usage", hdr, 0x7, 0x1, 0x4);
-- 
2.7.4




More information about the fwts-devel mailing list