[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 5/5] libxl: Support user-specified <emulator>
With the introduction of the libxlDomainGetEmulatorType function, it is trivial to support a user-specfied <emulator> in the libxl driver. This patch is based loosely on David Scott's old patch to do the same https://www.redhat.com/archives/libvir-list/2013-April/msg02119.html Signed-off-by: Jim Fehlig <jfehlig@xxxxxxxx> --- src/libxl/libxl_conf.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index 09211f8..882dcff 100644 --- a/src/libxl/libxl_conf.c +++ b/src/libxl/libxl_conf.c @@ -705,6 +705,21 @@ libxlMakeDomBuildInfo(virDomainDefPtr def, if (VIR_STRDUP(b_info->u.hvm.boot, bootorder) < 0) goto error; + if (def->emulator) { + if (!virFileExists(def->emulator)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("emulator '%s' not found"), + def->emulator); + goto error; + } + + VIR_FREE(b_info->device_model); + if (VIR_STRDUP(b_info->device_model, def->emulator) < 0) + goto error; + + b_info->device_model_version = libxlDomainGetEmulatorType(def); + } + if (def->nserials) { if (def->nserials > 1) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, -- 1.8.4.5 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |