diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2012-05-12 17:22:36 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2012-05-14 15:48:42 +0100 |
commit | 1ff0c158b3d7fcd43194ff4007ef1bf85bd3c733 (patch) | |
tree | d34529dbafb8cee2de87444dcfcfa0f77309d214 | |
parent | ff86b301c656ad13ba15947d12622917c633dcde (diff) | |
download | libguestfs-1ff0c158b3d7fcd43194ff4007ef1bf85bd3c733.tar.gz libguestfs-1ff0c158b3d7fcd43194ff4007ef1bf85bd3c733.tar.xz libguestfs-1ff0c158b3d7fcd43194ff4007ef1bf85bd3c733.zip |
qemu: Move -nodefaults etc logically together.
This is just code motion.
(cherry picked from commit 157f6fb18b7197f688ea761a4e52cd39287024f2)
-rw-r--r-- | src/launch.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/src/launch.c b/src/launch.c index 1f2c2a8d..7f59cabf 100644 --- a/src/launch.c +++ b/src/launch.c @@ -603,6 +603,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) { @@ -656,19 +672,6 @@ launch_appliance (guestfs_h *g) add_cmdline (g, "-enable-kvm"); } - /* 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"); |