[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libguestfs] [PATCH 2/10] Run qemu with -nographic option.



-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
New in Fedora 11: Fedora Windows cross-compiler. Compile Windows
programs, test, and build Windows installers. Over 70 libraries supprt'd
http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw
>From 6f0c788d45fa1be2140c46c2b375243241c29828 Mon Sep 17 00:00:00 2001
From: Richard Jones <rich koneko home annexia org>
Date: Sun, 21 Mar 2010 16:33:37 +0000
Subject: [PATCH 02/10] Run qemu with -nographic option.

On Mac OS X this prevents a short "flash" as qemu opens a
toplevel window.
---
 configure.ac  |    6 +++---
 src/guestfs.c |    5 +++--
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index e9d0fc0..93b6256 100644
--- a/configure.ac
+++ b/configure.ac
@@ -176,7 +176,7 @@ dnl fallback to null vmchannel (still using SLIRP).  See the
 dnl discussion in the README file.
 if test "x$vmchannel_test" != "xno"; then
     AC_MSG_CHECKING([for guestfwd support in $QEMU])
-    if $QEMU --help | grep -sq guestfwd; then
+    if $QEMU -nographic --help | grep -sq guestfwd; then
         AC_MSG_RESULT([yes])
         vmchannel_guestfwd=guestfwd
     else
@@ -185,7 +185,7 @@ if test "x$vmchannel_test" != "xno"; then
         # test failing.  This is because recent qemu will throw
         # up an SDL window and hang if we try to run this test.
         AC_MSG_CHECKING([for "-net channel" (old guestfwd) support in $QEMU])
-        vmchannelout=`$QEMU -net channel /dev/zero 2>&1 ||:`
+        vmchannelout=`$QEMU -nographic -net channel /dev/zero 2>&1 ||:`
         echo "vmchannel test command output: $vmchannelout" >&AS_MESSAGE_LOG_FD
         if echo "$vmchannelout" | grep -sq "vmchannel wrong port number" ; then
             AC_MSG_RESULT([yes])
@@ -197,7 +197,7 @@ if test "x$vmchannel_test" != "xno"; then
     fi
 
     AC_MSG_CHECKING([for "-net user" (user mode network) support in $QEMU])
-    if $QEMU --help | grep -sq -- "-net user"; then
+    if $QEMU -nographic --help | grep -sq -- "-net user"; then
         AC_MSG_RESULT([yes])
         vmchannel_net_user=yes
     else
diff --git a/src/guestfs.c b/src/guestfs.c
index 02d5fdb..e308044 100644
--- a/src/guestfs.c
+++ b/src/guestfs.c
@@ -1620,7 +1620,7 @@ test_qemu (guestfs_h *g)
   char cmd[1024];
   FILE *fp;
 
-  snprintf (cmd, sizeof cmd, "LC_ALL=C '%s' -help", g->qemu);
+  snprintf (cmd, sizeof cmd, "LC_ALL=C '%s' -nographic -help", g->qemu);
 
   fp = popen (cmd, "r");
   /* qemu -help should always work (qemu -version OTOH wasn't
@@ -1642,7 +1642,8 @@ test_qemu (guestfs_h *g)
   if (pclose (fp) == -1)
     goto error;
 
-  snprintf (cmd, sizeof cmd, "LC_ALL=C '%s' -version 2>/dev/null", g->qemu);
+  snprintf (cmd, sizeof cmd, "LC_ALL=C '%s' -nographic -version 2>/dev/null",
+	    g->qemu);
 
   fp = popen (cmd, "r");
   if (fp) {
-- 
1.6.4.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]