Skip to contentSkip to conversation

libxl: fix pathes for non-standard installations

PATCH New Christoph Egger 1 participant 1 message May 7, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libxl: fix pathes for non-standard installations

Hi!

Attached patch removes hardcoded pathes and corrects wrong path to qemu-dm.

Signature · 6 lines
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Andrew Bowd, Thomas M. McCoy, Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632
tools/libxl/libxl.c +5 -2
diff -r f45212955766 tools/libxl/libxl.c
@@ -1318,7 +1318,10 @@ int libxl_device_disk_add(struct libxl_c
 
                         null_r = open("/dev/null", O_RDONLY);
                         null_w = open("/dev/null", O_WRONLY);
-                        libxl_exec(null_r, p[1], null_w, "/usr/sbin/tapdisk2", args);
+                        libxl_exec(null_r, p[1], null_w,
+                                   libxl_abs_path(ctx, "tapdisk2",
+                                                  libxl_sbindir_path()),
+                                   args);
                         XL_LOG(ctx, XL_LOG_ERROR, "Error execing tapdisk2");
                     }
                     close(p[1]);
@@ -1758,7 +1761,7 @@ static int libxl_build_xenpv_qemu_args(s
     }
     info->domid = vfb->domid;
     info->dom_name = libxl_domid_to_name(ctx, vfb->domid);
-    info->device_model = libxl_abs_path(ctx, "qemu-dm", libxl_private_bindir_path());
+    info->device_model = libxl_abs_path(ctx, "qemu-dm", libxl_libexec_path());
     info->type = XENPV;
     return 0;
 }
tools/libxl/xl_cmdimpl.c +2 -2
diff -r f45212955766 tools/libxl/xl_cmdimpl.c
@@ -178,7 +178,7 @@ static void init_build_info(libxl_domain
     if (c_info->hvm) {
         b_info->shadow_memkb = libxl_get_required_shadow_memory(b_info->max_memkb, b_info->max_vcpus);
         b_info->video_memkb = 8 * 1024;
-        b_info->kernel = "/usr/lib/xen/boot/hvmloader";
+        b_info->kernel = "hvmloader";
         b_info->hvm = 1;
         b_info->u.hvm.pae = 1;
         b_info->u.hvm.apic = 1;
@@ -201,7 +201,7 @@ static void init_dm_info(libxl_device_mo
     }
 
     dm_info->dom_name = c_info->name;
-    dm_info->device_model = "/usr/lib/xen/bin/qemu-dm";
+    dm_info->device_model = "qemu-dm";
     dm_info->videoram = b_info->video_memkb / 1024;
     dm_info->apic = b_info->u.hvm.apic;
 

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel