diff mbox

[1/4] kvm tools: Make --kvm-dev option shorter

Message ID 1312765092-21190-1-git-send-email-asias.hejun@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Asias He Aug. 8, 2011, 12:58 a.m. UTC
This patch changes --kvm-dev to --dev.

Signed-off-by: Asias He <asias.hejun@gmail.com>
---
 tools/kvm/Documentation/kvm-run.txt |    3 +--
 tools/kvm/builtin-run.c             |   10 +++++-----
 2 files changed, 6 insertions(+), 7 deletions(-)
diff mbox

Patch

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 c8539cc..18e76b0 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"),
@@ -557,8 +557,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;
@@ -592,7 +592,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);