public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Asias He <asias.hejun@gmail.com>
To: Pekka Enberg <penberg@kernel.org>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>, Ingo Molnar <mingo@elte.hu>,
	Sasha Levin <levinsasha928@gmail.com>,
	Prasad Joshi <prasadjoshi124@gmail.com>,
	kvm@vger.kernel.org, Asias He <asias.hejun@gmail.com>
Subject: [PATCH 2/2] kvm tools: Tune the command-line option
Date: Fri, 13 May 2011 10:40:09 +0800	[thread overview]
Message-ID: <1305254409-9079-2-git-send-email-asias.hejun@gmail.com> (raw)
In-Reply-To: <1305254409-9079-1-git-send-email-asias.hejun@gmail.com>

With this patch we can have
	-c --cpus
	-m --mem
	-d --disk
	-k --kernel
	-i --initrd
which is more consistent and easy to remember.

The patch also frees up -s, -g option.

Ingo suggestied
'''
 The debug options should probably be concentrated under a --debug option
 anyway, to allow things like:

  --debug single-step,ioport

 Even if the debug options are kept they should be streamlined along
 the same
 pattern:

 >>         --debug-single-step     Enable single stepping
 >>         --debug-ioport          Enable ioport debugging

 But having a --debug option that recognizes all the debug flags would
 be nicer.

 It would also allow future enhancements to group debug features, like:

   --debug all                # turn on everything and the kitchen sink
   for early hangs
   --debug all,-single-step   # turn on everything except single-step
   debugging
   --debug nonverbose         # turn on all non-noisy debug options we
   have

 Maybe even:

   --debug memcheck

 ... could run kvm under valgrind automatically - that way we can hide
 any secondary tool complexities from the user and turn those tools into
 simple debug options :-)
'''

Let's do this --debug option consolidation later.

Signed-off-by: Asias He <asias.hejun@gmail.com>
---
 tools/kvm/kvm-run.c |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/tools/kvm/kvm-run.c b/tools/kvm/kvm-run.c
index 91a194e..ba8e5ce 100644
--- a/tools/kvm/kvm-run.c
+++ b/tools/kvm/kvm-run.c
@@ -101,16 +101,17 @@ static const struct option options[] = {
 	OPT_GROUP("Basic options:"),
 	OPT_INTEGER('c', "cpus", &nrcpus, "Number of CPUs"),
 	OPT_U64('m', "mem", &ram_size, "Virtual machine memory size in MiB."),
-	OPT_CALLBACK('i', "image", NULL, "image", "Disk image", img_name_parser),
+	OPT_CALLBACK('d', "disk", NULL, "image", "Disk image", img_name_parser),
 	OPT_STRING('\0', "console", &console, "serial or virtio",
 			"Console to use"),
-	OPT_BOOLEAN('\0', "virtio-rng", &virtio_rng,
+	OPT_BOOLEAN('\0', "rng", &virtio_rng,
 			"Enable virtio Random Number Generator"),
+	OPT_STRING('\0', "kvm-dev", &kvm_dev, "kvm-dev", "KVM device file"),
 
 	OPT_GROUP("Kernel options:"),
 	OPT_STRING('k', "kernel", &kernel_filename, "kernel",
 			"Kernel to boot in virtual machine"),
-	OPT_STRING('r', "initrd", &initrd_filename, "initrd",
+	OPT_STRING('i', "initrd", &initrd_filename, "initrd",
 			"Initial RAM disk image"),
 	OPT_STRING('p', "params", &kernel_cmdline, "params",
 			"Kernel command line arguments"),
@@ -124,14 +125,14 @@ static const struct option options[] = {
 			"Assign this address to the guest side NIC"),
 	OPT_STRING('\0', "tapscript", &script, "Script path",
 			 "Assign a script to process created tap device"),
+
 	OPT_GROUP("Debug options:"),
-	OPT_STRING('d', "kvm-dev", &kvm_dev, "kvm-dev", "KVM device file"),
-	OPT_BOOLEAN('s', "single-step", &single_step,
-			"Enable single stepping"),
-	OPT_BOOLEAN('g', "ioport-debug", &ioport_debug,
-			"Enable ioport debugging"),
 	OPT_BOOLEAN('\0', "debug", &do_debug_print,
 			"Enable debug messages"),
+	OPT_BOOLEAN('\0', "debug-single-step", &single_step,
+			"Enable single stepping"),
+	OPT_BOOLEAN('\0', "debug-ioport-debug", &ioport_debug,
+			"Enable ioport debugging"),
 	OPT_END()
 };
 
-- 
1.7.5.1


  reply	other threads:[~2011-05-13  2:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-13  2:40 [PATCH 1/2] kvm tools: Bring VIRTIO_BLK_F_SEG_MAX feature back to virtio blk Asias He
2011-05-13  2:40 ` Asias He [this message]
2011-05-13 12:46 ` Pekka Enberg
2011-05-13 14:07   ` Sasha Levin
2011-05-13 14:34     ` Asias He
2011-05-13 15:26       ` Sasha Levin
2011-05-13 16:16         ` Asias He

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1305254409-9079-2-git-send-email-asias.hejun@gmail.com \
    --to=asias.hejun@gmail.com \
    --cc=gorcunov@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=levinsasha928@gmail.com \
    --cc=mingo@elte.hu \
    --cc=penberg@kernel.org \
    --cc=prasadjoshi124@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox