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

Re: [PATCH] SquashError when Directory returns empty list



IMO, returning STATUS_OBJECT_PATH_NOT_FOUND for empty keys in the first 
place sounds a bit odd.

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

On 14/08/2025 15:48, Owen Smith wrote:
> Reduces log spam when running a listing of xenstore keys, where
> empty values are expected.
> 
> STORE(Directory) will translate ENOENT to STATUS_OBJECT_NAME_NOT_FOUND
> to indicate that the xenstore key does not exist, and return
> STATUS_OBJECT_PATH_NOT_FOUND to indicate the key exists, but contains
> no further data.
> 
> Signed-off-by: Owen Smith <owen.smith@xxxxxxxxx>
> ---
>   src/xeniface/ioctl_store.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/xeniface/ioctl_store.c b/src/xeniface/ioctl_store.c
> index 0fa850f..266eb73 100644
> --- a/src/xeniface/ioctl_store.c
> +++ b/src/xeniface/ioctl_store.c
> @@ -231,7 +231,8 @@ IoctlStoreDirectory(
>   
>       status = XENBUS_STORE(Directory, &Fdo->StoreInterface, NULL, NULL, 
> Buffer, &Value);
>       if (!NT_SUCCESS(status)) {
> -        if (status == STATUS_OBJECT_NAME_NOT_FOUND)
> +        if (status == STATUS_OBJECT_NAME_NOT_FOUND ||
> +            status == STATUS_OBJECT_PATH_NOT_FOUND)
>               SquashError = TRUE;
>           goto fail3;
>       }



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®.