diff mbox

[28/33] kvm tools: move the rest of the config initializations

Message ID 1346833927-15740-29-git-send-email-levinsasha928@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Sasha Levin Sept. 5, 2012, 8:32 a.m. UTC
These should appear before running any init calls.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
---
 tools/kvm/builtin-run.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox

Patch

diff --git a/tools/kvm/builtin-run.c b/tools/kvm/builtin-run.c
index f54a6c1..6e6fbf5 100644
--- a/tools/kvm/builtin-run.c
+++ b/tools/kvm/builtin-run.c
@@ -643,6 +643,9 @@  static int kvm_cmd_run_init(int argc, const char **argv)
 	if (!kvm->cfg.vnc && !kvm->cfg.sdl)
 		kvm->cfg.vidmode = -1;
 
+	if (!kvm->cfg.network)
+                kvm->cfg.network = DEFAULT_NETWORK;
+
 	memset(real_cmdline, 0, sizeof(real_cmdline));
 	kvm__arch_set_cmdline(real_cmdline, kvm->cfg.vnc || kvm->cfg.sdl);
 
@@ -789,9 +792,6 @@  static int kvm_cmd_run_init(int argc, const char **argv)
 		goto fail;
 	}
 
-	if (!kvm->cfg.network)
-		kvm->cfg.network = DEFAULT_NETWORK;
-
 	virtio_9p__init(kvm);
 
 	r = virtio_net__init(kvm);