Re: [PATCH v3 1/3] qemu-config: parse configuration files to a QDict

2021-05-21 Thread Paolo Bonzini
On 21/05/21 18:09, Kevin Wolf wrote: +qemu_opts_absorb_qdict(opts, qdict, errp); +if (errp) { This doesn't do what you wanted. *errp would be be better, but you also need ERRP_GUARD() then. The other option would be using the return value of qemu_opts_absorb_qdict(). Uff, you're abs

Re: [PATCH v3 1/3] qemu-config: parse configuration files to a QDict

2021-05-21 Thread Kevin Wolf
Am 21.05.2021 um 12:21 hat Paolo Bonzini geschrieben: > Change the parser to put the values into a QDict and pass them > to a callback. qemu_config_parse's QemuOpts creation is > itself turned into a callback function. > > This is useful for -readconfig to support keyval-based options; > getting

[PATCH v3 1/3] qemu-config: parse configuration files to a QDict

2021-05-21 Thread Paolo Bonzini
Change the parser to put the values into a QDict and pass them to a callback. qemu_config_parse's QemuOpts creation is itself turned into a callback function. This is useful for -readconfig to support keyval-based options; getting a QDict from the parser removes a roundtrip from QDict to QemuOpts