From: Sasha Levin Subject: [PATCH 28/33] kvm tools: move the rest of the config initializations Date: Wed, 5 Sep 2012 10:32:02 +0200 Message-ID: <1346833927-15740-29-git-send-email-levinsasha928@gmail.com> References: <1346833927-15740-1-git-send-email-levinsasha928@gmail.com> Cc: asias.hejun@gmail.com, mingo@elte.hu, gorcunov@openvz.org, kvm@vger.kernel.org, Sasha Levin To: penberg@kernel.org Return-path: Received: from mail-wg0-f44.google.com ([74.125.82.44]:58173 "EHLO mail-wg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758178Ab2IEIgb (ORCPT ); Wed, 5 Sep 2012 04:36:31 -0400 Received: by mail-wg0-f44.google.com with SMTP id dr13so393355wgb.1 for ; Wed, 05 Sep 2012 01:36:31 -0700 (PDT) In-Reply-To: <1346833927-15740-1-git-send-email-levinsasha928@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: These should appear before running any init calls. Signed-off-by: Sasha Levin --- tools/kvm/builtin-run.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); -- 1.7.12