|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] libxl: libxl_domain_create_restore has an extra argument
On Tue, Apr 05, 2016 at 04:12:57PM +0100, Ian Jackson wrote:
> Wei Liu writes ("Re: [PATCH] libxl: libxl_domain_create_restore has an extra
> argument"):
> > CC Jim as well
> >
> > On Tue, Apr 05, 2016 at 03:20:12PM +0100, Wei Liu wrote:
> > > In the latest libxenlight code, libxl_domain_create_restore accepts a
> > > new argument. Update libvirt's libxl driver for that. Use the macro
> > > provided by libxenlight to detect which version should be used.
> > >
> > > The new parameter (send_back_fd) is set to -1 because libvirt provides
> > > no such fd.
> ...
> > > -#ifdef LIBXL_HAVE_DOMAIN_CREATE_RESTORE_PARAMS
> > > +#if defined(LIBXL_HAVE_DOMAIN_CREATE_RESTORE_SEND_BACK_FD)
> > > + params.checkpointed_stream = 0;
> > > + ret = libxl_domain_create_restore(cfg->ctx, &d_config, &domid,
> > > + restore_fd, -1, ¶ms, NULL,
> > > + &aop_console_how);
> > > +#elif defined(LIBXL_HAVE_DOMAIN_CREATE_RESTORE_PARAMS)
> > > params.checkpointed_stream = 0;
> > > ret = libxl_domain_create_restore(cfg->ctx, &d_config, &domid,
> > > restore_fd, ¶ms, NULL,
>
> Another approach would be
>
> ret = libxl_domain_create_restore(cfg->ctx, &d_config, &domid,
> restore_fd,
> #ifdef LIBXL_HAVE_DOMAIN_CREATE_RESTORE_SEND_BACK_FD
> -1,
> #endif
> #ifdef LIBXL_HAVE_DOMAIN_CREATE_RESTORE_PARAMS
> ¶ms,
> #endif
> NULL, &aop_console_how);
>
> But which to choose is a matter of taste.
>
I merely followed the existing style. Let's keep it that way for now.
Wei.
> Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |