On Tue, 17 Apr 2012 22:26:55 +0200
Paolo Bonzini <pbonz...@redhat.com> 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)));
> > +                break;
> 
> Does this escape commas correctly?

No, but does it have to? Does QemuOpts accept an option with a coma in it?

> 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.

>   void cmd_foo(QemuOpts *arglist, Error **errp);

Until now we're treating hmp.c like an external QMP C client, using QemuOpts
this way will leak qemu internals to hmp.c...

> 
> and later on we could even replace the QemuOpts with a visitor for full
> QAPI-ness...
> 
> Paolo
> 


Reply via email to