aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxl
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2013-05-15 14:47:32 +0100
committerIan Campbell <ian.campbell@citrix.com>2013-08-21 10:39:20 +0100
commit5c7cbadaccca8dbb47f2c42ab1b5a8afac9275e3 (patch)
tree0f3fa769942ff67d46cb9cd6fd5dc412c6cb6656 /tools/libxl
parentb0f69ec5c71de1248d915c193b57c43e786857dd (diff)
downloadxen-5c7cbadaccca8dbb47f2c42ab1b5a8afac9275e3.tar.gz
xen-5c7cbadaccca8dbb47f2c42ab1b5a8afac9275e3.tar.bz2
xen-5c7cbadaccca8dbb47f2c42ab1b5a8afac9275e3.zip
tools: allow user to specify a system qemu-xen binary
If this option is given don't bother building qemu-xen ourselves. Likely to be handy for distros who have an existing qemu package which they want to reuse. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/libxl')
-rw-r--r--tools/libxl/libxl_dm.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
index 615dcf3945..4035b6db62 100644
--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -33,6 +33,15 @@ const char *libxl__device_model_savefile(libxl__gc *gc, uint32_t domid)
return libxl__sprintf(gc, "/var/lib/xen/qemu-save.%d", domid);
}
+static const char *qemu_xen_path(libxl__gc *gc)
+{
+#ifdef QEMU_XEN_PATH
+ return QEMU_XEN_PATH;
+#else
+ return libxl__abs_path(gc, "qemu-system-i386", libxl__libexec_path());
+#endif
+}
+
const char *libxl__domain_device_model(libxl__gc *gc,
const libxl_domain_build_info *info)
{
@@ -50,7 +59,7 @@ const char *libxl__domain_device_model(libxl__gc *gc,
dm = libxl__abs_path(gc, "qemu-dm", libxl__libexec_path());
break;
case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN:
- dm = libxl__abs_path(gc, "qemu-system-i386", libxl__libexec_path());
+ dm = qemu_xen_path(gc);
break;
default:
LIBXL__LOG(ctx, LIBXL__LOG_ERROR,