[tip:tools/kvm] kvm tools: Make --kvm-dev option shorter

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

 



Commit-ID:  3c3456a71314ef68ddfe57543b2fc363e0fd5fcd
Gitweb:     http://git.kernel.org/tip/3c3456a71314ef68ddfe57543b2fc363e0fd5fcd
Author:     Asias He <asias.hejun@xxxxxxxxx>
AuthorDate: Mon, 8 Aug 2011 08:58:09 +0800
Committer:  Pekka Enberg <penberg@xxxxxxxxxx>
CommitDate: Tue, 9 Aug 2011 16:51:05 +0300

kvm tools: Make --kvm-dev option shorter

This patch changes --kvm-dev to --dev.

Signed-off-by: Asias He <asias.hejun@xxxxxxxxx>
Signed-off-by: Pekka Enberg <penberg@xxxxxxxxxx>
---
 tools/kvm/Documentation/kvm-run.txt |    3 +--
 tools/kvm/builtin-run.c             |   10 +++++-----
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/tools/kvm/Documentation/kvm-run.txt b/tools/kvm/Documentation/kvm-run.txt
index a4e0fe7..6513427 100644
--- a/tools/kvm/Documentation/kvm-run.txt
+++ b/tools/kvm/Documentation/kvm-run.txt
@@ -32,8 +32,7 @@ OPTIONS
 --kernel=::
 	The virtual machine kernel.
 
--d
---kvm-dev=::
+--dev=::
 	KVM device file.
 
 -i::
diff --git a/tools/kvm/builtin-run.c b/tools/kvm/builtin-run.c
index 364b538..b48c855 100644
--- a/tools/kvm/builtin-run.c
+++ b/tools/kvm/builtin-run.c
@@ -68,7 +68,7 @@ static const char *vmlinux_filename;
 static const char *initrd_filename;
 static const char *image_filename[MAX_DISK_IMAGES];
 static const char *console;
-static const char *kvm_dev;
+static const char *dev;
 static const char *network;
 static const char *host_ip;
 static const char *guest_ip;
@@ -163,7 +163,7 @@ static const struct option options[] = {
 			"Console to use"),
 	OPT_INCR('\0', "rng", &virtio_rng,
 			"Enable virtio Random Number Generator"),
-	OPT_STRING('\0', "kvm-dev", &kvm_dev, "kvm-dev", "KVM device file"),
+	OPT_STRING('\0', "dev", &dev, "device_file", "KVM device file"),
 	OPT_CALLBACK('\0', "virtio-9p", NULL, "dirname,tag_name",
 		     "Enable 9p over virtio", virtio_9p_rootdir_parser),
 	OPT_BOOLEAN('\0', "balloon", &balloon, "Enable virtio balloon"),
@@ -560,8 +560,8 @@ int kvm_cmd_run(int argc, const char **argv, const char *prefix)
 
 	ram_size <<= MB_SHIFT;
 
-	if (!kvm_dev)
-		kvm_dev = DEFAULT_KVM_DEV;
+	if (!dev)
+		dev = DEFAULT_KVM_DEV;
 
 	if (!console)
 		console = DEFAULT_CONSOLE;
@@ -595,7 +595,7 @@ int kvm_cmd_run(int argc, const char **argv, const char *prefix)
 		guest_name = default_name;
 	}
 
-	kvm = kvm__init(kvm_dev, ram_size, guest_name);
+	kvm = kvm__init(dev, ram_size, guest_name);
 
 	irq__init(kvm);
 
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux