diff mbox series

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

Message ID 20210713063809.5458-1-ivan.hu@canonical.com
State Accepted
Headers show
Series [V2] uefirttime: add advice for the timezone 2047 failure (LP: #1933503) | expand

Commit Message

Ivan Hu July 13, 2021, 6:38 a.m. UTC
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@canonical.com>
---
 src/uefi/uefirttime/uefirttime.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Colin Ian King July 13, 2021, 6:42 a.m. UTC | #1
On 13/07/2021 07:38, Ivan Hu wrote:
> 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@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..786f29a2 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 firmware 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;
>  	}
>  
> 

Thanks Ivan.

Acked-by: Colin Ian King <colin.king@canonical.com>
Alex Hung July 13, 2021, 5:45 p.m. UTC | #2
On 2021-07-13 12:38 a.m., Ivan Hu wrote:
> 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@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..786f29a2 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 firmware 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;
>  	}
>  
> 

Acked-by: Alex Hung <alex.hung@canonical.com>
diff mbox series

Patch

diff --git a/src/uefi/uefirttime/uefirttime.c b/src/uefi/uefirttime/uefirttime.c
index 9c3d6a19..786f29a2 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 firmware 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;
 	}