[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 10/13] libxl: add option to choose who executes hotplug scripts
Roger Pau Monne writes ("[PATCH 10/13] libxl: add option to choose who executes hotplug scripts"): > Add and option to xl.conf file to decide if hotplug scripts are > executed from the toolstack (xl) or from udev as it used to be in the > past. ... > + if (libxl_defbool_val(info->run_hotplug_scripts)) { > + if (!libxl__xs_read(gc, t, DISABLE_UDEV_PATH) && (nb_vm - 1)) { > + LOG(ERROR, "cannot change hotplug execution option once set, " > + "please shutdown all guests before changing it"); > + rc = ERROR_FAIL; > + goto out; > + } > + libxl__xs_write(gc, t, DISABLE_UDEV_PATH, "1"); > + } else { > + if (libxl__xs_read(gc, t, DISABLE_UDEV_PATH) && (nb_vm - 1)) { > + LOG(ERROR, "cannot change hotplug execution option once set, " > + "please shutdown all guests before changing it"); > + rc = ERROR_FAIL; > + goto out; > + } > + xs_rm(ctx->xsh, t, DISABLE_UDEV_PATH); How about int disable_wanted_now = something involving libxl__xs_read(....); if (disable_wanted_now != libxl_defbool_val(info->run_hotplug_scripts) { LOG(ERROR, etc. } ? Also you should check for the errno value from libxl__xs_read. ENOENT is fine but anything else should be a fatal error. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |