[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen staging] libxl: Add libxl__ev_qmp to libxl__ao_device
commit 37010f7d7c3d77945f4226daf3b08e9c4d50b48f Author: Anthony PERARD <anthony.perard@xxxxxxxxxx> AuthorDate: Wed Apr 17 17:16:07 2019 +0100 Commit: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> CommitDate: Fri Sep 20 10:42:42 2019 +0100 libxl: Add libxl__ev_qmp to libxl__ao_device `aodev->qmp' is initialised in libxl__prepare_ao_device(), but since there isn't a single exit path for a `libxl__ao_device', users of this new `qmp' field will have to disposed of it. Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx> Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> --- tools/libxl/libxl_device.c | 2 ++ tools/libxl/libxl_internal.h | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/tools/libxl/libxl_device.c b/tools/libxl/libxl_device.c index 1941fe780a..1402b61a81 100644 --- a/tools/libxl/libxl_device.c +++ b/tools/libxl/libxl_device.c @@ -644,6 +644,8 @@ void libxl__prepare_ao_device(libxl__ao *ao, libxl__ao_device *aodev) * without actually calling any hotplug script */ libxl__async_exec_init(&aodev->aes); libxl__ev_child_init(&aodev->child); + + libxl__ev_qmp_init(&aodev->qmp); } /* multidev */ diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index 1144aaa3a5..43a431f535 100644 --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -2592,6 +2592,10 @@ typedef void libxl__device_callback(libxl__egc*, libxl__ao_device*); * Once _prepare has been called on a libxl__ao_device, it is safe to just * discard this struct, there's no need to call any destroy function. * _prepare can also be called multiple times with the same libxl__ao_device. + * + * But if any of the fields `backend_ds', `timeout', `xswait', `qmp' is + * used by a caller of _prepare, the caller will have to arrange to clean + * or dispose of them. */ _hidden void libxl__prepare_ao_device(libxl__ao *ao, libxl__ao_device *aodev); @@ -2623,6 +2627,7 @@ struct libxl__ao_device { bool update_json; /* for asynchronous execution of synchronous-only syscalls etc. */ libxl__ev_child child; + libxl__ev_qmp qmp; }; /* -- generated by git-patchbot for /home/xen/git/xen.git#staging _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |