From patchwork Sun Jul 17 08:57:02 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Asias He X-Patchwork-Id: 983022 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p6H8xnbm023120 for ; Sun, 17 Jul 2011 08:59:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754386Ab1GQI7r (ORCPT ); Sun, 17 Jul 2011 04:59:47 -0400 Received: from mail-iw0-f174.google.com ([209.85.214.174]:63499 "EHLO mail-iw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754299Ab1GQI7q (ORCPT ); Sun, 17 Jul 2011 04:59:46 -0400 Received: by mail-iw0-f174.google.com with SMTP id 6so2294615iwn.19 for ; Sun, 17 Jul 2011 01:59:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=8/ghbCE+rU/lsHUdyXxVU85eEarSGXD5hSnTPZNPULo=; b=QXjkhK48NX1Na6VZw5DY9nDcDlXNSfe/20gAk04z7RKBC+WEjbsZc+E2KK0h1tY8L8 ACQzfVr35rZO0Ggl0b/NQo8PTngTSf8sU/MrBxIk+/ripS3c+5k2tMVUDZNDYNL8wK3u 1qJMCnffCAEm6HfNnqzffMeBnH5cFLgvPnwxs= Received: by 10.42.151.202 with SMTP id f10mr5345885icw.96.1310893186075; Sun, 17 Jul 2011 01:59:46 -0700 (PDT) Received: from localhost.localdomain ([219.224.169.130]) by mx.google.com with ESMTPS id us2sm3593680icb.19.2011.07.17.01.59.43 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 17 Jul 2011 01:59:45 -0700 (PDT) From: Asias He To: Pekka Enberg Cc: Cyrill Gorcunov , Ingo Molnar , Sasha Levin , Prasad Joshi , kvm@vger.kernel.org, Asias He Subject: [PATCH 14/16] kvm tools: Rename --host-ip-addr to --host-ip Date: Sun, 17 Jul 2011 16:57:02 +0800 Message-Id: <1310893024-21615-15-git-send-email-asias.hejun@gmail.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1310893024-21615-1-git-send-email-asias.hejun@gmail.com> References: <1310893024-21615-1-git-send-email-asias.hejun@gmail.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Sun, 17 Jul 2011 08:59:49 +0000 (UTC) This patch makes the network options more consistent. We are having: --host-ip --host-mac --guest-ip --guest-mac now. Signed-off-by: Asias He --- tools/kvm/builtin-run.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/kvm/builtin-run.c b/tools/kvm/builtin-run.c index 12cf75b..af2e089 100644 --- a/tools/kvm/builtin-run.c +++ b/tools/kvm/builtin-run.c @@ -69,7 +69,7 @@ static const char *image_filename[MAX_DISK_IMAGES]; static const char *console; static const char *kvm_dev; static const char *network; -static const char *host_ip_addr; +static const char *host_ip; static const char *guest_ip; static const char *guest_mac; static const char *host_mac; @@ -166,7 +166,7 @@ static const struct option options[] = { OPT_GROUP("Networking options:"), OPT_STRING('n', "network", &network, "user, tap, none", "Network to use"), - OPT_STRING('\0', "host-ip-addr", &host_ip_addr, "a.b.c.d", + OPT_STRING('\0', "host-ip", &host_ip, "a.b.c.d", "Assign this address to the host side networking"), OPT_STRING('\0', "guest-ip", &guest_ip, "a.b.c.d", "Assign this address to the guest side networking"), @@ -547,8 +547,8 @@ int kvm_cmd_run(int argc, const char **argv, const char *prefix) else active_console = CONSOLE_8250; - if (!host_ip_addr) - host_ip_addr = DEFAULT_HOST_ADDR; + if (!host_ip) + host_ip = DEFAULT_HOST_ADDR; if (!guest_ip) guest_ip = DEFAULT_GUEST_ADDR; @@ -660,8 +660,8 @@ int kvm_cmd_run(int argc, const char **argv, const char *prefix) network = DEFAULT_NETWORK; if (strncmp(network, "none", 4)) { - net_params.host_ip = host_ip_addr; net_params.guest_ip = guest_ip; + net_params.host_ip = host_ip; net_params.kvm = kvm; net_params.script = script; sscanf(guest_mac, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx",