[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 5/7] Squash Error when LogLevel value is not present



On 11/11/2025 09:34, Owen Smith wrote:
> LogLevel override values are usually not present, and this will reduce logging
> which is not required.
> 
> Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx>

Reviewed-by: Tu Dinh <ngoc-tu.dinh@xxxxxxxxxx>

> ---
>   src/xen/log.c | 11 +++++++++--
>   1 file changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/src/xen/log.c b/src/xen/log.c
> index a65b233..8673105 100644
> --- a/src/xen/log.c
> +++ b/src/xen/log.c
> @@ -744,14 +744,20 @@ LogReadLogLevel(
>       PANSI_STRING        Values;
>       ULONG               Type;
>       ULONG               Index;
> +    BOOLEAN             SquashError;
>       NTSTATUS            status;
>   
> +    SquashError = FALSE;
> +
>       status = RegistryQuerySzValue(Key,
>                                     Name,
>                                     &Type,
>                                     &Values);
> -    if (!NT_SUCCESS(status))
> +    if (!NT_SUCCESS(status)) {
> +        if (status == STATUS_OBJECT_NAME_NOT_FOUND)
> +            SquashError = TRUE;
>           goto fail1;
> +    }
>   
>       status = STATUS_INVALID_PARAMETER;
>       if (Type != REG_MULTI_SZ)
> @@ -780,7 +786,8 @@ fail2:
>       RegistryFreeSzValue(Values);
>   
>   fail1:
> -    Error("fail1 (%08x)\n", status);
> +    if (!SquashError)
> +        Error("fail1 (%08x)\n", status);
>   
>       *LogLevel = LOG_LEVEL_NONE;
>   



--
Ngoc Tu Dinh | Vates XCP-ng Developer

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.