Re: [Qemu-devel] [PATCH RFC v3 2/5] keyval: New keyval_parse()

2017-02-24 Thread Markus Armbruster
Eric Blake writes: > On 02/24/2017 03:06 PM, Eric Blake wrote: > >> On 02/24/2017 02:18 PM, Markus Armbruster wrote: I have a preference for option 1 in the long run, but as it seems to be upwards compatible from option 2 for -blockdev in 2.9, I'm leaning towards option 2 for this

Re: [Qemu-devel] [PATCH RFC v3 2/5] keyval: New keyval_parse()

2017-02-24 Thread Eric Blake
On 02/24/2017 03:06 PM, Eric Blake wrote: > > Also for 2.9: turn on the deprecation warning for QemuOpts negative > sugar, but leave positive sugar unchanged (it seems like positive sugar > is probably more in use than negative sugar, other than chardev nowait). Capturing the gist of an IRC conv

Re: [Qemu-devel] [PATCH RFC v3 2/5] keyval: New keyval_parse()

2017-02-24 Thread Eric Blake
On 02/24/2017 02:18 PM, Markus Armbruster wrote: >> I have a preference for option 1 in the long run, but as it seems to be >> upwards compatible from option 2 for -blockdev in 2.9, I'm leaning >> towards option 2 for this release. > > Let me rename the options: > > * "no sugar -blockdev": both "

Re: [Qemu-devel] [PATCH RFC v3 2/5] keyval: New keyval_parse()

2017-02-24 Thread Markus Armbruster
Eric Blake writes: > On 02/24/2017 01:06 PM, Markus Armbruster wrote: > >> >> The value of an implied key is not subject to key desugaring. > > And that's a good thing. > >> >> Without an implied key, the "node" would desugar to "de=off". >> >>> How about: >>> >>> for 2.9: -blockdev has no mag

Re: [Qemu-devel] [PATCH RFC v3 2/5] keyval: New keyval_parse()

2017-02-24 Thread Eric Blake
On 02/24/2017 01:06 PM, Markus Armbruster wrote: > > The value of an implied key is not subject to key desugaring. And that's a good thing. > > Without an implied key, the "node" would desugar to "de=off". > >> How about: >> >> for 2.9: -blockdev has no magic at all (you HAVE to spell 'foo=of

Re: [Qemu-devel] [PATCH RFC v3 2/5] keyval: New keyval_parse()

2017-02-24 Thread Markus Armbruster
Eric Blake writes: > On 02/24/2017 01:58 AM, Markus Armbruster wrote: > >>> I hate the 'no$key' sugar, and would love to get rid of it. It makes >>> things ambiguous (thus confusing) for precious little gain: 'novocaine' >>> can mean 'novocaine=on' or 'vocaine=off'. QemuOpts picks the latter, >

Re: [Qemu-devel] [PATCH RFC v3 2/5] keyval: New keyval_parse()

2017-02-24 Thread Eric Blake
On 02/24/2017 01:58 AM, Markus Armbruster wrote: >> I hate the 'no$key' sugar, and would love to get rid of it. It makes >> things ambiguous (thus confusing) for precious little gain: 'novocaine' >> can mean 'novocaine=on' or 'vocaine=off'. QemuOpts picks the latter, >> even when a QemuOpt named

Re: [Qemu-devel] [PATCH RFC v3 2/5] keyval: New keyval_parse()

2017-02-24 Thread Markus Armbruster
Markus Armbruster writes: > Eric Blake writes: > >> On 02/21/2017 03:01 PM, Markus Armbruster wrote: [...] >>> +/* Implied value */ >>> +qdict = keyval_parse("an,noaus,noaus=", NULL, &error_abort); >>> +g_assert_cmpuint(qdict_size(qdict), ==, 3); >>> +g_assert_cmpstr(qdict_get_tr

Re: [Qemu-devel] [PATCH RFC v3 2/5] keyval: New keyval_parse()

2017-02-23 Thread Markus Armbruster
Eric Blake writes: > On 02/21/2017 03:01 PM, Markus Armbruster wrote: >> keyval_parse() parses KEY=VALUE,... into a QDict. Works like >> qemu_opts_parse(), except: >> >> * Returns a QDict instead of a QemuOpts (d'oh). >> >> * It supports nesting, unlike QemuOpts: a KEY is split into key >> c

Re: [Qemu-devel] [PATCH RFC v3 2/5] keyval: New keyval_parse()

2017-02-22 Thread Eric Blake
On 02/21/2017 03:01 PM, Markus Armbruster wrote: > keyval_parse() parses KEY=VALUE,... into a QDict. Works like > qemu_opts_parse(), except: > > * Returns a QDict instead of a QemuOpts (d'oh). > > * It supports nesting, unlike QemuOpts: a KEY is split into key > components at '.' (dotted key c