From patchwork Wed Sep 5 08:32:02 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 1406651 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 8016E402E1 for ; Wed, 5 Sep 2012 08:36:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758198Ab2IEIge (ORCPT ); Wed, 5 Sep 2012 04:36:34 -0400 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=PwOf9WDUzNfDTv0TfFUvB5zmhzOV2rA8ps9ExYb5RXQ=; b=aP9xmKDArYzs8QrtjFA6E3aiorrwIBes/Fpo7hGZsILikgoIDp5QbpqqeQjfVcqXXh ccaJvstAiyMD4Zjcjhp79v+1Egd/4/lfs9W9EMEVEPphwXkcU0eiy8sK+1Bcruliw+Eq Be72+Q0EDoHTGpeQtCcpc1N3L7fYHMd3IZKTqo1wkPJvPKJkQ4vy204AXY92hk+ecHcM IH51XqKVHZCKo5JUCNt2IxJLo1tP+26Bxuh7I0xLyK5bs/rwGvpqm/INtry4nXkUVUyF zvMl/0TPf1bGYdKJakLNS4FYdznRVqCxTKDwfZgbMEkYOsQ6RJ8MISKDSGg0x7mGfwPF VePw== Received: by 10.216.195.212 with SMTP id p62mr12830923wen.217.1346834191066; Wed, 05 Sep 2012 01:36:31 -0700 (PDT) Received: from lappy.capriciverd.com (20.Red-80-59-140.staticIP.rima-tde.net. [80.59.140.20]) by mx.google.com with ESMTPS id q4sm27971068wix.9.2012.09.05.01.36.28 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 05 Sep 2012 01:36:30 -0700 (PDT) From: Sasha Levin To: penberg@kernel.org Cc: asias.hejun@gmail.com, mingo@elte.hu, gorcunov@openvz.org, kvm@vger.kernel.org, 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> X-Mailer: git-send-email 1.7.12 In-Reply-To: <1346833927-15740-1-git-send-email-levinsasha928@gmail.com> References: <1346833927-15740-1-git-send-email-levinsasha928@gmail.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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);