]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
kvm tools: move the rest of the config initializations
authorSasha Levin <levinsasha928@gmail.com>
Wed, 5 Sep 2012 08:32:02 +0000 (10:32 +0200)
committerPekka Enberg <penberg@kernel.org>
Wed, 5 Sep 2012 13:22:38 +0000 (16:22 +0300)
These should appear before running any init calls.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/builtin-run.c

index ecc80be42abb2227734175465e6195c3810fca91..8209cf19df894448cd89ae3885016ed3560e79f7 100644 (file)
@@ -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);