[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 2 of 3] libxl: split libxl_domain_shutdown into libxl_domain_shutdown & libxl_domain_reboot



On Thu, 2011-12-15 at 17:05 +0000, Ian Jackson wrote:
> Ian Campbell writes ("Re: [Xen-devel] [PATCH 2 of 3] libxl: split 
> libxl_domain_shutdown into libxl_domain_shutdown & libxl_domain_reboot"):
> > libxl: split libxl_domain_shutdown into libxl_domain_shutdown & 
> > libxl_domain_reboot
> > 
> > The other integer request types which shutdown supported are not useful. 
> > Specifically:
> > 
> >  * "suspend" is not usable via this interface since it requires other
> >    scaffolding, libxl_domain_suspend provides this already.
> >  * "halt" is the same as "poweroff".
> >  * "crash" is unused and at least Linux does not implement it. If a user
> >    steps forward then libxl_domain_crash is trivial to add.
> 
> The effect of this is to duplicate 25 lines of code.

Ye, I should have rethought this after I pulled the fallback handling
out of the library into xl (originally the two function had different
fallbacks). I'll rework it.

Ian.

> 
> If you really think we should split these into separate functions,
> rather than just sorting out the faux-enum, the separate functions
> probably want to turn out to be something like:
> 
>     int libxl_domain_reboot(libxl_ctx *ctx, uint32_t domid)
>     {
>         return libxl__domain_pvcontrol(ctx, domid, "reboot");
>     }
> 
> Ian.



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.