[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 15/18] qapi: implement support for variable argu
From: |
Luiz Capitulino |
Subject: |
Re: [Qemu-devel] [PATCH 15/18] qapi: implement support for variable argument list |
Date: |
Wed, 18 Apr 2012 09:51:58 -0300 |
On Wed, 18 Apr 2012 08:57:19 +0200
Paolo Bonzini <address@hidden> wrote:
> Il 17/04/2012 22:42, Luiz Capitulino ha scritto:
> > On Tue, 17 Apr 2012 22:26:55 +0200
> > Paolo Bonzini <address@hidden> 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?
>
> Yes, ",," is parsed as ",".
The current code doesn't escape either... Either, it's because the user is
expected to it him/herself or we don't have any option that accepts a coma.
> >> 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_add and the no_gen qmp_netdev_add as front-ends
> for the QAPI cmd_netdev_add. I think it's fair when we have to take
> into account backwards-compatibility. The conversion gives correct
> error propagation, so even though QemuOpts still leaks it's a step in
> the right direction.
I thought Anthony had plans to replace QemuOpts with something else,
I think it was qcfg, but I might be wrong. Anthony?
- [Qemu-devel] [PATCH 03/18] qemu-option: parse_option_bool(): use error_set(), (continued)
- [Qemu-devel] [PATCH 03/18] qemu-option: parse_option_bool(): use error_set(), Luiz Capitulino, 2012/04/17
- [Qemu-devel] [PATCH 11/18] qerror: introduce QERR_INVALID_OPTION_GROUP, Luiz Capitulino, 2012/04/17
- [Qemu-devel] [PATCH 12/18] qemu-config: find_list(): use error_set(), Luiz Capitulino, 2012/04/17
- [Qemu-devel] [PATCH 16/18] net: purge the monitor object from all init functions, Luiz Capitulino, 2012/04/17
- [Qemu-devel] [PATCH 17/18] qapi: convert netdev_add, Luiz Capitulino, 2012/04/17
- [Qemu-devel] [PATCH 18/18] qapi: convert netdev_del, Luiz Capitulino, 2012/04/17
- [Qemu-devel] [PATCH 15/18] qapi: implement support for variable argument list, Luiz Capitulino, 2012/04/17
- Re: [Qemu-devel] [PATCH 15/18] qapi: implement support for variable argument list, Anthony Liguori, 2012/04/18
- Re: [Qemu-devel] [PATCH 15/18] qapi: implement support for variable argument list, Luiz Capitulino, 2012/04/18
- Re: [Qemu-devel] [PATCH 15/18] qapi: implement support for variable argument list, Paolo Bonzini, 2012/04/18
[Qemu-devel] [PATCH 13/18] qemu-config: introduce qemu_find_opts_err(), Luiz Capitulino, 2012/04/17