On Wed, 2015-07-15 at 13:48 +0100, Ian Campbell wrote: > On Wed, 2015-07-15 at 15:45 +0800, Yang Hongyang wrote: > > check QEMU state before resume dm on QEMU_XEN_TRADITIONAL. > > > > Signed-off-by: Yang Hongyang <yan...@cn.fujitsu.com> > > CC: Ian Campbell <ian.campb...@citrix.com> > > CC: Ian Jackson <ian.jack...@eu.citrix.com> > > CC: Wei Liu <wei.l...@citrix.com> > > --- > > tools/libxl/libxl_dom_suspend.c | 13 +++++++++++-- > > 1 file changed, 11 insertions(+), 2 deletions(-) > > > > diff --git a/tools/libxl/libxl_dom_suspend.c > > b/tools/libxl/libxl_dom_suspend.c > > index 6f04c26..686a49b 100644 > > --- a/tools/libxl/libxl_dom_suspend.c > > +++ b/tools/libxl/libxl_dom_suspend.c > > @@ -434,11 +434,20 @@ static void > > domain_suspend_callback_common_done(libxl__egc *egc, > > > > int libxl__domain_resume_device_model(libxl__gc *gc, uint32_t domid) > > { > > + char *path; > > + char *state; > > Can both be const. > > Could also be on one line, but that is is a matter of taste so up to > you. > > > switch (libxl__device_model_version_running(gc, domid)) { > > case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL: { > > - libxl__qemu_traditional_cmd(gc, domid, "continue"); > > - libxl__wait_for_device_model_deprecated(gc, domid, "running", > > NULL, NULL, NULL); > > + uint32_t dm_domid = libxl_get_stubdom_id(CTX, domid); > > + > > + path = libxl__device_model_xs_path(gc, dm_domid, domid, "/state"); > > + state = libxl__xs_read(gc, XBT_NULL, path); > > + if (state != NULL && !strcmp(state, "paused")) { > > + libxl__qemu_traditional_cmd(gc, domid, "continue"); > > Please can you explain the apparent discrepancy between the use of > dm_domid and domid here?
Wei explained this, so with at least the const-ness issue mentioned above fixed: Acked-by: Ian Campbell <ian.campb...@citrix.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel