summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-05-12 17:22:36 +0100
committerRichard W.M. Jones <rjones@redhat.com>2012-05-12 17:22:36 +0100
commit157f6fb18b7197f688ea761a4e52cd39287024f2 (patch)
treeeff237d4250f4d7c0209c7b2f377b360e5bbcfd8 /src
parenteb29a9424ccaa56cc6b2b667a2fdb6a75d6d59af (diff)
downloadlibguestfs-157f6fb18b7197f688ea761a4e52cd39287024f2.tar.gz
libguestfs-157f6fb18b7197f688ea761a4e52cd39287024f2.tar.xz
libguestfs-157f6fb18b7197f688ea761a4e52cd39287024f2.zip
qemu: Move -nodefaults etc logically together.
This is just code motion.
Diffstat (limited to 'src')
-rw-r--r--src/launch.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/launch.c b/src/launch.c
index a7c75ee9..c14b369e 100644
--- a/src/launch.c
+++ b/src/launch.c
@@ -640,6 +640,22 @@ launch_appliance (guestfs_h *g)
add_cmdline (g, "virtio-blk-pci.scsi=off");
}
+ if (qemu_supports (g, "-nodefconfig"))
+ add_cmdline (g, "-nodefconfig");
+
+ /* Newer versions of qemu (from around 2009/12) changed the
+ * behaviour of monitors so that an implicit '-monitor stdio' is
+ * assumed if we are in -nographic mode and there is no other
+ * -monitor option. Only a single stdio device is allowed, so
+ * this broke the '-serial stdio' option. There is a new flag
+ * called -nodefaults which gets rid of all this default crud, so
+ * let's use that to avoid this and any future surprises.
+ */
+ if (qemu_supports (g, "-nodefaults"))
+ add_cmdline (g, "-nodefaults");
+
+ add_cmdline (g, "-nographic");
+
/* Add drives */
struct drive *drv = g->drives;
while (drv != NULL) {
@@ -653,9 +669,6 @@ launch_appliance (guestfs_h *g)
drv = drv->next;
}
- if (qemu_supports (g, "-nodefconfig"))
- add_cmdline (g, "-nodefconfig");
-
if (STRNEQ (QEMU_OPTIONS, "")) {
/* Add the extra options for the qemu command line specified
* at configure time.
@@ -705,19 +718,6 @@ launch_appliance (guestfs_h *g)
}
#endif /* i386 or x86-64 */
- /* Newer versions of qemu (from around 2009/12) changed the
- * behaviour of monitors so that an implicit '-monitor stdio' is
- * assumed if we are in -nographic mode and there is no other
- * -monitor option. Only a single stdio device is allowed, so
- * this broke the '-serial stdio' option. There is a new flag
- * called -nodefaults which gets rid of all this default crud, so
- * let's use that to avoid this and any future surprises.
- */
- if (qemu_supports (g, "-nodefaults"))
- add_cmdline (g, "-nodefaults");
-
- add_cmdline (g, "-nographic");
-
if (g->smp > 1) {
snprintf (buf, sizeof buf, "%d", g->smp);
add_cmdline (g, "-smp");