On 13.11.22 11:21, Christian Storm wrote:
> From: Christian Storm <[email protected]>
> 
> DEFAULT_TIMEOUT_SEC in include/bootguard.h was unused
> and the default timeout value of 30 was hard-coded in
> env/env_api_fat.c. Introduce DEFAULT_TIMEOUT_SEC proper
> in include/env_api.h and make use of it.
> 
> Signed-off-by: Christian Storm <[email protected]>
> ---
>  env/env_api_fat.c   | 2 +-
>  include/bootguard.h | 2 --
>  include/env_api.h   | 2 ++
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/env/env_api_fat.c b/env/env_api_fat.c
> index a08100b..d588e7f 100644
> --- a/env/env_api_fat.c
> +++ b/env/env_api_fat.c
> @@ -450,7 +450,7 @@ BGENV *bgenv_create_new(void)
>       env_new->data->revision = new_rev;
>       env_new->data->in_progress = 1;
>       /* set default watchdog timeout */
> -     env_new->data->watchdog_timeout_sec = 30;
> +     env_new->data->watchdog_timeout_sec = DEFAULT_TIMEOUT_SEC;
>  
>       return env_new;
>  
> diff --git a/include/bootguard.h b/include/bootguard.h
> index 588b122..6a70187 100644
> --- a/include/bootguard.h
> +++ b/include/bootguard.h
> @@ -31,8 +31,6 @@ typedef int BG_STATUS;
>  #define BG_CONFIG_ERROR BGERR(110)
>  #define BG_NOT_IMPLEMENTED BGERR(200)
>  
> -#define DEFAULT_TIMEOUT_SEC 60
> -
>  extern EFI_HANDLE this_image;
>  
>  typedef struct _BG_LOADER_PARAMS {
> diff --git a/include/env_api.h b/include/env_api.h
> index e6b58d4..b796682 100644
> --- a/include/env_api.h
> +++ b/include/env_api.h
> @@ -41,6 +41,8 @@
>       }
>  #endif
>  
> +#define DEFAULT_TIMEOUT_SEC 30
> +
>  extern bool bgenv_verbosity;
>  
>  #define VERBOSE(o, ...)                                                      
>  \

Thanks, applied.

Jan

-- 
Siemens AG, Technology
Competence Center Embedded Linux

-- 
You received this message because you are subscribed to the Google Groups "EFI 
Boot Guard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/efibootguard-dev/36ef77bf-8eeb-eb02-54e0-3f3e11aa63e3%40siemens.com.

Reply via email to