From: walimis <walimisdev@gmail.com>
To: Sasha Levin <levinsasha928@gmail.com>
Cc: penberg@kernel.org, kvm@vger.kernel.org, mingo@elte.hu,
asias.hejun@gmail.com, gorcunov@gmail.com
Subject: Re: [PATCH 1/7] kvm tools: Print version when running 'kvm --version'
Date: Fri, 12 Aug 2011 23:45:49 +0800 [thread overview]
Message-ID: <20110812154549.GC20279@walimis-desktop> (raw)
In-Reply-To: <1313164039.3651.5.camel@lappy>
On Fri, Aug 12, 2011 at 06:47:19PM +0300, Sasha Levin wrote:
>On Fri, 2011-08-12 at 23:22 +0800, walimis wrote:
>> On Fri, Aug 12, 2011 at 06:20:54PM +0300, Sasha Levin wrote:
>> >Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
>> >---
>> > tools/kvm/kvm-cmd.c | 1 +
>> > 1 files changed, 1 insertions(+), 0 deletions(-)
>> >
>> >diff --git a/tools/kvm/kvm-cmd.c b/tools/kvm/kvm-cmd.c
>> >index e85f22f..3a90d6d 100644
>> >--- a/tools/kvm/kvm-cmd.c
>> >+++ b/tools/kvm/kvm-cmd.c
>> >@@ -24,6 +24,7 @@ struct cmd_struct kvm_commands[] = {
>> > { "balloon", kvm_cmd_balloon, NULL, 0 },
>> > { "list", kvm_cmd_list, NULL, 0 },
>> > { "version", kvm_cmd_version, NULL, 0 },
>> >+ { "--version", kvm_cmd_version, NULL, 0 },
>> Although it works, I think it's not good way to implement a option
>> as a command.
>
>Since kvm tools isn't going to support options to 'kvm' itself, I
>believe that even though it looks somewhat hacky, it's the simplest and
>most correct solution.
>
>If we were going to add more parameters besides '--version' then yes,
>let's write a better interface.
>
>Perf for example allow '--version' by doing a strcmp() before command
>parsing, which is equally not that nice :)
OK, I get it.
Thanks.
walimis
>
>--
>
>Sasha.
>
prev parent reply other threads:[~2011-08-12 16:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-12 15:20 [PATCH 1/7] kvm tools: Print version when running 'kvm --version' Sasha Levin
2011-08-12 15:20 ` [PATCH 2/7] kvm tools: Connect existing command helpers to 'kvm help' Sasha Levin
2011-08-12 15:20 ` [PATCH 3/7] kvm tools: Improve 'kvm stop' parameters Sasha Levin
2011-08-12 15:20 ` [PATCH 4/7] kvm tools: Improve 'kvm resume' parameters Sasha Levin
2011-08-12 15:20 ` [PATCH 5/7] kvm tools: Improve 'kvm pause' parameters Sasha Levin
2011-08-12 15:20 ` [PATCH 6/7] kvm tools: Improve 'kvm debug' parameters Sasha Levin
2011-08-12 15:21 ` [PATCH 7/7] kvm tools: Improve 'kvm balloon' parameters Sasha Levin
2011-08-12 15:22 ` [PATCH 1/7] kvm tools: Print version when running 'kvm --version' walimis
2011-08-12 15:39 ` Pekka Enberg
2011-08-12 15:43 ` walimis
2011-08-12 15:47 ` Sasha Levin
2011-08-12 15:45 ` walimis [this message]
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=20110812154549.GC20279@walimis-desktop \
--to=walimisdev@gmail.com \
--cc=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 \
/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