|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH RFC 7/9] libxl: introduce specific error codes in libxl_device_disk_add
Rob Hoes writes ("[PATCH RFC 7/9] libxl: introduce specific error codes in
libxl_device_disk_add"):
> Signed-off-by: Rob Hoes <rob.hoes@xxxxxxxxxx>
...
> diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
> index f622981..2f56c6e 100644
> --- a/tools/libxl/libxl.c
> +++ b/tools/libxl/libxl.c
> @@ -2008,9 +2008,16 @@ static int libxl__device_nextid(libxl__gc *gc,
> uint32_t domid, char *device)
> static int libxl__resolve_domid(libxl__gc *gc, const char *name,
> uint32_t *domid)
> {
> + int rc;
> if (!name)
> return 0;
> - return libxl_domain_qualifier_to_domid(CTX, name, domid);
> +
> + rc = libxl_domain_qualifier_to_domid(CTX, name, domid);
> +
> + if (rc < 0)
> + return ERROR_DOMAIN_NOTFOUND;
> + else
> + return rc;
This doesn't seem right. You're smashing all the errors to domain not
found. Surely libxl_domain_qualifier_to_domid should return the right
error to start with.
The rest looks plausible (modulo my quibbles about names in my earlier
mails).
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |