[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v1 03/10] libxl: store a copy of vanilla domain configuration when creating domain
On Thu, 2014-07-10 at 15:32 +0100, Wei Liu wrote: > +/* update the saved domain configuration with a callback function, > + * which is responsible to pull in useful fields from src. > + */ > +typedef void (update_callback)(libxl__gc *, libxl_domain_config *, > + const libxl_domain_config *); > +static int libxl__update_domain_configuration(libxl__gc *gc, > + uint32_t domid, > + update_callback callback, > + const libxl_domain_config *src) You aren't using your shiny new locking functions here? > +{ > + libxl_domain_config d_config_saved; > + int rc; > + > + libxl_domain_config_init(&d_config_saved); > + > + rc = libxl__get_domain_configuration(gc, domid, &d_config_saved); > + > + if (rc) { > + LOG(ERROR, "cannot get domain configuration: %d", rc); > + goto out; > + } > + > + callback(gc, &d_config_saved, src); > + > + rc = libxl__set_domain_configuration(gc, domid, &d_config_saved); > + > + if (rc) > + LOG(ERROR, "cannot set domain configuration: %d", rc); > + > + libxl_domain_config_dispose(&d_config_saved); > + > +out: > + return rc; > +} > + > static void domcreate_complete(libxl__egc *egc, > libxl__domain_create_state *dcs, > int rc) _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |