[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 2/2] libxl: preserve console tty across soft reset
On Mon, Mar 20, 2017 at 07:03:11PM +0100, Vitaly Kuznetsov wrote: > > @@ -1737,6 +1737,12 @@ static int do_domain_soft_reset(libxl_ctx *ctx, > state->console_mfn = xs_console_mfn ? atol(xs_console_mfn): 0; > free(xs_console_mfn); > > + xs_console_tty = xs_read(ctx->xsh, XBT_NULL, > + GCSPRINTF("%s/console/tty", dom_path), > + NULL); Please use one of the libxl__xs_read variants here. I think libxl__xs_read_mandatory fits the bill. > + state->console_tty = libxl__strdup(gc, xs_console_tty); > + free(xs_console_tty); > + > dss->ao = ao; > dss->domid = dss->dsps.domid = domid_soft_reset; > dss->dsps.dm_savefile = GCSPRINTF(LIBXL_DEVICE_MODEL_SAVE_FILE".%d", > diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h > index 7722665..88fca8e 100644 > --- a/tools/libxl/libxl_internal.h > +++ b/tools/libxl/libxl_internal.h > @@ -1123,6 +1123,7 @@ typedef struct { > uint32_t console_port; > uint32_t console_domid; > unsigned long console_mfn; > + char *console_tty; > > char *saved_state; > > -- > 2.9.3 > _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |