[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema command
From: |
Luiz Capitulino |
Subject: |
Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema command |
Date: |
Thu, 25 Apr 2013 08:36:00 -0400 |
On Thu, 25 Apr 2013 11:52:58 +0800
Amos Kong <address@hidden> wrote:
> On Wed, Apr 24, 2013 at 01:39:08PM -0600, Eric Blake wrote:
> > On 04/24/2013 12:20 PM, Luiz Capitulino wrote:
> > > On Thu, 25 Apr 2013 01:33:24 +0800
> > > Amos Kong <address@hidden> wrote:
> > >
> > >> Libvirt has no way to probe if an option or property is supported,
> > >> This patch introdues a new qmp command to query configuration schema
> > >> information. hmp command isn't added because it's not needed.
> > >>
> > >> V2: fix jaso schema and comments (Eric)
>
> ...
>
> > >> +#
> > >> +# @flag: If no value is given, the flag is set to 1. Otherwise the
> > >> value must
> > >> +# be "on" (set to 1) or "off" (set to 0)
> > >
> > > Let's call this 'boolean', because it's what it is. Also, I suggest
> > > 'Accepts "on" or "off"' as the help text.
> >
> > I'm fine with calling the enum value 'boolean' even where the C code
> > called it 'flag'. As long as we have a documented name that describes
> > the semantics of what the parameter will take, libvirt should be able to
> > cope.
> >
> > One other concern - you document that if a flag parameter is omitted,
> > then it defaults to 1. Is that really true?
>
>
> I'm wrong. If it's omitted in cmdline, we will give it a default value.
>
> example:
> enable_mlock = qemu_opt_get_bool(opts, "mlock", true);
>
> another example:
> -boot strict=on
>
> bool boot_strict; (false by default)
>
> strict boot is disabled by default, type of strict parameter is
> 'QEMU_OPT_STRING'
> the logical default parameter is "off".
>
> This kind of default info is only added in help descriptions right
> now, we can add a new item 'default_value' to option.h:QemuOptDesc &
> qapi-schema.json:CommandLineParameterInfo in future?
Yes. I don't think we'll have enough time to fix this now.
>
> I guess the default value is useful for libvirt.
>
> However, we live in different timezone, so I will post my latest patch
> to maillist (no change about default value).
>
> Agree with other comments, thanks.
>
>
> Amos.
>
- Re: [Qemu-devel] [PATCH 2/2] monitor: introduce query-config-schema command, (continued)
- Re: [Qemu-devel] [PATCH 2/2] monitor: introduce query-config-schema command, Eric Blake, 2013/04/24
- [Qemu-devel] [PATCH] monitor: introduce query-config-schema command, Amos Kong, 2013/04/24
- [Qemu-devel] [PATCH v2] monitor: introduce query-config-schema command, Amos Kong, 2013/04/24
- Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema command, Luiz Capitulino, 2013/04/24
- Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema command, Eric Blake, 2013/04/24
- Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema command, Eric Blake, 2013/04/24
- Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema command, Amos Kong, 2013/04/24
- Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema command, Osier Yang, 2013/04/25
- Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema command, Amos Kong, 2013/04/25
- Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema command,
Luiz Capitulino <=
- Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema command, Eric Blake, 2013/04/25
- Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema command, Amos Kong, 2013/04/24
- Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema command, Luiz Capitulino, 2013/04/24
- Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema command, Eric Blake, 2013/04/24
- Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema command, Amos Kong, 2013/04/24
- Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema command, Luiz Capitulino, 2013/04/24
- Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema command, Eric Blake, 2013/04/24
- Re: [Qemu-devel] [PATCH] monitor: introduce query-config-schema command, Osier Yang, 2013/04/24
Re: [Qemu-devel] [RESEND PATCH 1/2] qapi: introduce strList and visit_type_strList(), Eric Blake, 2013/04/24