|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 05/14] libxl: xc_physdev_map return -1 and populate errno.
On Mon, 2015-03-16 at 11:39 -0400, Konrad Rzeszutek Wilk wrote:
> The users of these (qemu) check for a negative value
> so we are safe in regards to that. However they
> also use the return value to inform the user of the
> error.
IIRC I saw a qemu patch go past to fix the callers?
> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
> ---
> tools/libxc/xc_physdev.c | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/tools/libxc/xc_physdev.c b/tools/libxc/xc_physdev.c
> index cf02d85..9b064b8 100644
> --- a/tools/libxc/xc_physdev.c
> +++ b/tools/libxc/xc_physdev.c
> @@ -43,8 +43,10 @@ int xc_physdev_map_pirq(xc_interface *xch,
> struct physdev_map_pirq map;
>
> if ( !pirq )
> - return -EINVAL;
> -
> + {
> + errno = EINVAL;
> + return -1;
> + }
> memset(&map, 0, sizeof(struct physdev_map_pirq));
> map.domid = domid;
> map.type = MAP_PIRQ_TYPE_GSI;
> @@ -72,8 +74,10 @@ int xc_physdev_map_pirq_msi(xc_interface *xch,
> struct physdev_map_pirq map;
>
> if ( !pirq )
> - return -EINVAL;
> -
> + {
> + errno = EINVAL;
> + return -1;
> + }
> memset(&map, 0, sizeof(struct physdev_map_pirq));
> map.domid = domid;
> map.type = MAP_PIRQ_TYPE_MSI;
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |