qemu-trivial
[Top][All Lists]
Advanced

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

Re: [PATCH] Report stringified errno in VFIO related errors


From: Cornelia Huck
Subject: Re: [PATCH] Report stringified errno in VFIO related errors
Date: Fri, 14 Feb 2020 10:47:40 +0100

On Fri, 14 Feb 2020 09:47:39 +0100
Michal Privoznik <address@hidden> wrote:

> In a few places we report errno formatted as a negative integer.
> This is not as user friendly as it can be. Use strerror() and/or
> error_setg_errno() instead.
> 
> Signed-off-by: Michal Privoznik <address@hidden>
> ---
>  hw/vfio/common.c    | 2 +-
>  util/vfio-helpers.c | 6 +++---
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/hw/vfio/common.c b/hw/vfio/common.c
> index 5ca11488d6..a3a2a82d99 100644
> --- a/hw/vfio/common.c
> +++ b/hw/vfio/common.c
> @@ -352,7 +352,7 @@ static int vfio_dma_map(VFIOContainer *container, hwaddr 
> iova,
>          return 0;
>      }
>  
> -    error_report("VFIO_MAP_DMA: %d", -errno);
> +    error_report("VFIO_MAP_DMA failed: %s", strerror(errno));
>      return -errno;
>  }

I think you missed the one in vfio_dma_unmap().

(...)

The other file looks good.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]