Ian Campbell 於 西元2015年07月24日 16:57 寫道:
On Fri, 2015-07-24 at 01:38 +0800, Ting-Wei Lan wrote:
Ian Campbell 於 西元2015年07月21日 23:10 寫道:
On Fri, 2015-07-17 at 00:15 +0800, Ting-Wei Lan wrote:

This all looks pretty good. One comment:

+if test "x$qemu_xen_path" = "x" || test "x$qemu_xen_path" =
"xqemu";
then :
+
+    qemu_xen_path_service="$LIBEXEC_BIN/qemu-system-i386"

It's a shame we have to repeat the "qemu-system-i386" here and in
libxl_dm.c.

I think rather than adding a new qemu_xen_path_service we should
just
make the existing $qemu_xen_path default to the full
$LIBEXEC_BIN/qemu
-system-i386 and have it substituted everywhere much like you've
done
here.

Then libxl_dm.c:qemu_xen_path() can return QEMU_XEN_PATH always.

The help strings says:
Use system supplied qemu PATH or qemu (taken from $PATH) as qemu-xen
device model

When $withval is yes, qemu_xen_path() returns "qemu" instead of a
full
path, so it cannot use QEMU_XEN_PATH because we are going to change
it
to a full path.

I think if $withval is yes and we are converting that to "qemu" then
QEMU_XEN_PATH should just be "qemu" and we should substitute that in
the initscript too. IOW the "taken from $PATH" applies just as much to
the initscript usage as it does to the toolstack.

Yes, we can use "qemu" in init scripts, but systemd service files require absolute paths. We still have to do different things such as "/usr/bin/env qemu" for systemd.


Ian.

  Although qemu path in service file and init script is
already broken if $withval is yes because we cannot know the full
path
of qemu when configuring, I think we still need to keep
qemu_xen_path()
working.


What do you think?

Ian.



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to