Re: [Qemu-devel] [PATCH 15/18] qapi: implement support for variable argument list

2012-04-18 Thread Paolo Bonzini
Il 18/04/2012 16:12, Luiz Capitulino ha scritto: >> > Yeah, I think that's a reasonable suggestion. > I hope you guys have reviewed the boring qemu-option changes too :) Oh, those are perfectly fine. :) Paolo

Re: [Qemu-devel] [PATCH 15/18] qapi: implement support for variable argument list

2012-04-18 Thread Luiz Capitulino
On Wed, 18 Apr 2012 08:32:57 -0500 Anthony Liguori wrote: > On 04/17/2012 03:26 PM, Paolo Bonzini wrote: > > Il 17/04/2012 21:36, Luiz Capitulino ha scritto: > >> +switch(qobject_type(obj)) { > >> +case QTYPE_QSTRING: > >> +qstring_append(arglist, > >> +

Re: [Qemu-devel] [PATCH 15/18] qapi: implement support for variable argument list

2012-04-18 Thread Paolo Bonzini
Il 18/04/2012 14:51, Luiz Capitulino ha scritto: > >> It seems much easier to use no_gen and qemu_opts_from_qdict... Then > >> cmd_netdev_add can be >>> > > >>> > > netdev_add/del is expected to be a stable interface, so we can't use >>> > > no_gen. >> > >> > You can have hmp_netdev_a

Re: [Qemu-devel] [PATCH 15/18] qapi: implement support for variable argument list

2012-04-18 Thread Anthony Liguori
On 04/17/2012 03:26 PM, Paolo Bonzini wrote: Il 17/04/2012 21:36, Luiz Capitulino ha scritto: +switch(qobject_type(obj)) { +case QTYPE_QSTRING: +qstring_append(arglist, + qstring_get_str(qobject_to_qstring(obj))); +

Re: [Qemu-devel] [PATCH 15/18] qapi: implement support for variable argument list

2012-04-18 Thread Luiz Capitulino
On Wed, 18 Apr 2012 08:57:19 +0200 Paolo Bonzini wrote: > Il 17/04/2012 22:42, Luiz Capitulino ha scritto: > > On Tue, 17 Apr 2012 22:26:55 +0200 > > Paolo Bonzini wrote: > > > >> Il 17/04/2012 21:36, Luiz Capitulino ha scritto: > >>> +switch(qobject_type(obj)) { > >>> +

Re: [Qemu-devel] [PATCH 15/18] qapi: implement support for variable argument list

2012-04-17 Thread Paolo Bonzini
Il 17/04/2012 22:42, Luiz Capitulino ha scritto: > On Tue, 17 Apr 2012 22:26:55 +0200 > Paolo Bonzini wrote: > >> Il 17/04/2012 21:36, Luiz Capitulino ha scritto: >>> +switch(qobject_type(obj)) { >>> +case QTYPE_QSTRING: >>> +qstring_append(arglist, >>> +

Re: [Qemu-devel] [PATCH 15/18] qapi: implement support for variable argument list

2012-04-17 Thread Luiz Capitulino
On Tue, 17 Apr 2012 22:26:55 +0200 Paolo Bonzini wrote: > Il 17/04/2012 21:36, Luiz Capitulino ha scritto: > > +switch(qobject_type(obj)) { > > +case QTYPE_QSTRING: > > +qstring_append(arglist, > > + qstring_get_str(qobject_to_

Re: [Qemu-devel] [PATCH 15/18] qapi: implement support for variable argument list

2012-04-17 Thread Paolo Bonzini
Il 17/04/2012 21:36, Luiz Capitulino ha scritto: > +switch(qobject_type(obj)) { > +case QTYPE_QSTRING: > +qstring_append(arglist, > + qstring_get_str(qobject_to_qstring(obj))); > +break; Does this escape commas c

[Qemu-devel] [PATCH 15/18] qapi: implement support for variable argument list

2012-04-17 Thread Luiz Capitulino
The variable argument list allows QAPI functions to receive a string in the format "name1=value1,name2=value2 ... nameN=valueN". This is going to be used by QMP commands that accept options in QemuOpts format, like netdev_add. The variable argument list is represented by the QAPI type '**'. It's