[PATCH 14/16] kvm tools: Rename --host-ip-addr to --host-ip

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <asias.hejun@xxxxxxxxx>
---
 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",
-- 
1.7.5.4

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux