[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 05/27] qapi: add SIZE type parser to string_inpu
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 05/27] qapi: add SIZE type parser to string_input_visitor |
Date: |
Mon, 25 Nov 2013 17:32:34 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130923 Thunderbird/17.0.9 |
Il 25/11/2013 17:04, Michael S. Tsirkin ha scritto:
>>> > >
>>> > > Does this put syntax like "value": "128M" in QMP? If yes, NAK. QMP
>>> > > does not want fancy syntax for numbers, only plain numbers.
>>> > >
>> >
>> > I thought QMP uses its own qmp_visitor, so it shouldn't affect general QMP,
>> > if I'm not mistaken.
>> >
>> > but it allows to use unified memdev_add parser for all interfaces
>> > (CLI/HMP/QMP) and
>> > it's more user friendly to have on CLI/HMP size=1G vs long integer to
>> > express it.
> Yes please. Firing up a calculator to figure out how much is 1G is not
> friendly, neither is firing it up to figure out what did management do
> with QMP. It should be a text based interface not a binary one.
Wait. :)
Command-line and *HMP* object_add (and if we add them, qom_get/qom_set)
should be a text based interface. Right now it could be implemented
using object_property_parse/print which use the
string-input/output-visitor. This is the visitor that this patch touches.
QMP object_add (like qom_get/qom-set) should not be at all a text based
interface. As Igor says, it should use the QDict-based visitor.
This is unfortunately a counter-example to the rule that HMP commands
should always be implemented in terms of their QMP counterparts. I do
not believe this is really a problem. It can be fixed later; for now, I
think "perfect is the enemy of good" applies.
Paolo
- Re: [Qemu-devel] [PATCH 04/27] vl: convert -m to qemu_opts_parse(), (continued)
- [Qemu-devel] [PATCH 02/27] rename pci_hotplug_fn to hotplug_fn and make it available for other devices, Igor Mammedov, 2013/11/20
- [Qemu-devel] [PATCH 05/27] qapi: add SIZE type parser to string_input_visitor, Igor Mammedov, 2013/11/20
- Re: [Qemu-devel] [PATCH 05/27] qapi: add SIZE type parser to string_input_visitor, Markus Armbruster, 2013/11/21
- Re: [Qemu-devel] [PATCH 05/27] qapi: add SIZE type parser to string_input_visitor, Igor Mammedov, 2013/11/25
- Re: [Qemu-devel] [PATCH 05/27] qapi: add SIZE type parser to string_input_visitor, Michael S. Tsirkin, 2013/11/25
- Re: [Qemu-devel] [PATCH 05/27] qapi: add SIZE type parser to string_input_visitor,
Paolo Bonzini <=
- Re: [Qemu-devel] [PATCH 05/27] qapi: add SIZE type parser to string_input_visitor, Eric Blake, 2013/11/25
- Re: [Qemu-devel] [PATCH 05/27] qapi: add SIZE type parser to string_input_visitor, Paolo Bonzini, 2013/11/25
- Re: [Qemu-devel] [PATCH 05/27] qapi: add SIZE type parser to string_input_visitor, Markus Armbruster, 2013/11/27
- Re: [Qemu-devel] [PATCH 05/27] qapi: add SIZE type parser to string_input_visitor, Paolo Bonzini, 2013/11/27
- Re: [Qemu-devel] [PATCH 05/27] qapi: add SIZE type parser to string_input_visitor, Markus Armbruster, 2013/11/27
- Re: [Qemu-devel] [PATCH 05/27] qapi: add SIZE type parser to string_input_visitor, Paolo Bonzini, 2013/11/27
[Qemu-devel] [PATCH 06/27] get reference to /backend container via qemu_get_backend(), Igor Mammedov, 2013/11/20
[Qemu-devel] [PATCH 07/27] add memdev backend infrastructure, Igor Mammedov, 2013/11/20