[PATCH] uefirttime: add advice for the timezone 2047 failure (LP: #1933503)

Ivan Hu ivan.hu at canonical.com
Fri Jul 9 07:29:19 UTC 2021


Some system firmwares do not support the timezone value
EFI_UNSPECIFIED_TIMEZONE(2047) and set the value 0 directly
instead of returning status EFI_INVALID_PARAMETER error.
Add the advice information for the failure.

Signed-off-by: Ivan Hu <ivan.hu at canonical.com>
---
 src/uefi/uefirttime/uefirttime.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/uefi/uefirttime/uefirttime.c b/src/uefi/uefirttime/uefirttime.c
index 9c3d6a19..e4c7af51 100644
--- a/src/uefi/uefirttime/uefirttime.c
+++ b/src/uefi/uefirttime/uefirttime.c
@@ -417,6 +417,11 @@ static int uefirttime_test4(fwts_framework *fw)
 	    !((oldtime.TimeZone != 0) && (newtime.TimeZone == 0))) {
 		fwts_failed(fw, LOG_LEVEL_HIGH, "UEFIRuntimeSetTimeTimezone",
 			"Failed to set timezone with UEFI runtime service.");
+		fwts_advice(fw,
+			"Some system firmwares may not support the timezone "
+			"value EFI_UNSPECIFIED_TIMEZONE(2047) and set the "
+			"value 0 directly instead of returning an error which "
+			"causes the failure.");
 		return FWTS_ERROR;
 	}
 
-- 
2.25.1




More information about the fwts-devel mailing list