[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 12/15] libxl_usb: Fix libxl_device_usbctrl_getinfo
`usbctrl' is modified in this function which doesn't seems to be intended, and usbctrlinfo.backend_id was never modified. Take this opportunity to consify the argument `usbctrl' in libxl API to avoid similar mistake. Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx> --- tools/libxl/libxl.h | 2 +- tools/libxl/libxl_usb.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h index 9bacfb97f0..750ef1b7d0 100644 --- a/tools/libxl/libxl.h +++ b/tools/libxl/libxl.h @@ -1950,7 +1950,7 @@ void libxl_device_usbctrl_list_free(libxl_device_usbctrl *list, int nr); int libxl_device_usbctrl_getinfo(libxl_ctx *ctx, uint32_t domid, - libxl_device_usbctrl *usbctrl, + const libxl_device_usbctrl *usbctrl, libxl_usbctrlinfo *usbctrlinfo); /* USB Devices */ diff --git a/tools/libxl/libxl_usb.c b/tools/libxl/libxl_usb.c index 694870a3c3..9851fe8468 100644 --- a/tools/libxl/libxl_usb.c +++ b/tools/libxl/libxl_usb.c @@ -641,7 +641,7 @@ libxl_device_usbctrl_list(libxl_ctx *ctx, uint32_t domid, int *num) } int libxl_device_usbctrl_getinfo(libxl_ctx *ctx, uint32_t domid, - libxl_device_usbctrl *usbctrl, + const libxl_device_usbctrl *usbctrl, libxl_usbctrlinfo *usbctrlinfo) { GC_INIT(ctx); @@ -678,7 +678,7 @@ int libxl_device_usbctrl_getinfo(libxl_ctx *ctx, uint32_t domid, be_path = READ_SUBPATH(libxl_path, "backend"); usbctrlinfo->backend = libxl__strdup(NOGC, be_path); rc = libxl__backendpath_parse_domid(gc, be_path, - &usbctrl->backend_domid); + &usbctrlinfo->backend_id); if (rc) goto out; usbctrlinfo->state = READ_SUBPATH_INT(fe_path, "state"); usbctrlinfo->evtch = READ_SUBPATH_INT(fe_path, "event-channel"); @@ -691,7 +691,7 @@ int libxl_device_usbctrl_getinfo(libxl_ctx *ctx, uint32_t domid, } else { usbctrlinfo->ports = READ_SUBPATH_INT(libxl_path, "num-ports"); usbctrlinfo->version = READ_SUBPATH_INT(libxl_path, "usb-ver"); - rc = libxl__get_domid(gc, &usbctrl->backend_domid); + rc = libxl__get_domid(gc, &usbctrlinfo->backend_id); if (rc) goto out; } -- Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |