diff options
author | Bamvor Jian Zhang <bjzhang@suse.com> | 2013-01-11 12:22:28 +0000 |
---|---|---|
committer | Bamvor Jian Zhang <bjzhang@suse.com> | 2013-01-11 12:22:28 +0000 |
commit | 9c23a1d0eb7a6b5e3273d527cfd7960838fbfee6 (patch) | |
tree | 504e3550d6e38fe6fa0bd7a55616950e2fd22e67 /tools | |
parent | 5bb2be127bb4ee2fa6fa4545ad68f084d3bc09b0 (diff) | |
download | xen-9c23a1d0eb7a6b5e3273d527cfd7960838fbfee6.tar.gz xen-9c23a1d0eb7a6b5e3273d527cfd7960838fbfee6.tar.bz2 xen-9c23a1d0eb7a6b5e3273d527cfd7960838fbfee6.zip |
fix wrong path while calling pygrub and libxl-save-helper
in current xen x86_64, the default libexec directory is /usr/lib/xen/bin,
while the private binder is /usr/lib64/xen/bin. but some commands(pygrub,
libxl-save-helper) located in private binder directory is called from
libexec directory which lead to the following error:
1, for pygrub bootloader:
libxl: debug: libxl_bootloader.c:429:bootloader_disk_attached_cb: /usr/lib/xen/bin/pygrub doesn't exist, falling back to config path
2, for libxl-save-helper:
libxl: cannot execute /usr/lib/xen/bin/libxl-save-helper: No such file or directory
libxl: error: libxl_utils.c:363:libxl_read_exactly: file/stream truncated reading ipc msg header from domain 3 save/restore helper stdout pipe
libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: domain 3 save/restore helper [10222] exited with error status 255
there are two ways to fix above error. the first one is make such command
store in the /usr/lib/xen/bin and /usr/lib64/xen/bin(symbol link to
previous), e.g. qemu-dm. The second way is using private binder dir
instead of libexec dir. e.g. xenconsole.
For these cases, the latter one is suitable.
Signed-off-by: Bamvor Jian Zhang <bjzhang@suse.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/libxl/libxl_bootloader.c | 2 | ||||
-rw-r--r-- | tools/libxl/libxl_save_callout.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tools/libxl/libxl_bootloader.c b/tools/libxl/libxl_bootloader.c index e103ee9666..ed12b2cf2b 100644 --- a/tools/libxl/libxl_bootloader.c +++ b/tools/libxl/libxl_bootloader.c @@ -419,7 +419,7 @@ static void bootloader_disk_attached_cb(libxl__egc *egc, const char *bltmp; struct stat st; - bltmp = libxl__abs_path(gc, bootloader, libxl__libexec_path()); + bltmp = libxl__abs_path(gc, bootloader, libxl__private_bindir_path()); /* Check to see if the file exists in this location; if not, * fall back to checking the path */ LOG(DEBUG, "Checking for bootloader in libexec path: %s", bltmp); diff --git a/tools/libxl/libxl_save_callout.c b/tools/libxl/libxl_save_callout.c index 078b7eefe5..f164e98462 100644 --- a/tools/libxl/libxl_save_callout.c +++ b/tools/libxl/libxl_save_callout.c @@ -172,7 +172,7 @@ static void run_helper(libxl__egc *egc, libxl__save_helper_state *shs, shs->stdout_what = GCSPRINTF("domain %"PRIu32" save/restore helper" " stdout pipe", domid); - *arg++ = getenv("LIBXL_SAVE_HELPER") ?: LIBEXEC "/" "libxl-save-helper"; + *arg++ = getenv("LIBXL_SAVE_HELPER") ?: PRIVATE_BINDIR "/" "libxl-save-helper"; *arg++ = mode_arg; const char **stream_fd_arg = arg++; for (i=0; i<num_argnums; i++) |