[Pkg-libvirt-commits] [libguestfs] 46/61: test-tool: Handle mapping other architectures to qemu-system-* binaries.

Hilko Bengen bengen at moszumanska.debian.org
Fri Oct 31 19:09:40 UTC 2014


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to annotated tag debian/1%1.28.2-1
in repository libguestfs.

commit 0a00c5dc800ce3a578ffcc8b7df8e2acf84d9225
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Fri Oct 24 16:55:36 2014 +0100

    test-tool: Handle mapping other architectures to qemu-system-* binaries.
    
    (cherry picked from commit 4ff6ba35502736a2aed1f17eda67728f624c3390)
---
 test-tool/test-tool.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/test-tool/test-tool.c b/test-tool/test-tool.c
index c0c4798..848571d 100644
--- a/test-tool/test-tool.c
+++ b/test-tool/test-tool.c
@@ -388,11 +388,16 @@ set_qemu (guestfs_h *g, const char *path, int use_wrapper)
            "#!/bin/sh -\n"
            "host_cpu=%s\n"
            "qemudir='%s'\n"
-           "if [ $host_cpu != \"ppc64le\" ]; then \n"
-           "qemu=\"$qemudir/$host_cpu-softmmu/qemu-system-$host_cpu\"\n"
-           "else"
-           "qemu=\"$qemudir/$host_cpu-softmmu/qemu-system-ppc64\"\n"
-           "fi"
+           "case $host_cpu in\n"
+           "    amd64*) qemu=\"$qemudir/$host_cpu-softmmu/qemu-system-x86_64\"\n"
+           "            ;;\n"
+           "    arm*) qemu=\"$qemudir/$host_cpu-softmmu/qemu-system-arm\"\n"
+           "          ;;\n"
+           "    ppc64le) qemu=\"$qemudir/$host_cpu-softmmu/qemu-system-ppc64\"\n"
+           "             ;;\n"
+           "    *) qemu=\"$qemudir/$host_cpu-softmmu/qemu-system-$host_cpu\"\n"
+           "       ;;\n"
+           "esac\n"
            "exec \"$qemu\" -L \"$qemudir/pc-bios\" \"$@\"\n",
            host_cpu, path);
   fclose (fp);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list