On Mon, Sep 26, 2016 at 10:45:51 +0200, Jiri Denemark wrote:
On Fri, Sep 23, 2016 at 15:25:00 +0200, Michal Privoznik wrote:
> Just like we did two commits ago, don't try to fetch capabilities
> for non-existing binary. Re-use the ones we have for running
> domain.
>
> Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
> ---
> src/qemu/qemu_domain.c | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
> index 1f5ef92..99baf5c 100644
> --- a/src/qemu/qemu_domain.c
> +++ b/src/qemu/qemu_domain.c
> @@ -2562,15 +2562,19 @@ qemuDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
> virCapsPtr caps,
> unsigned int parseFlags,
> void *opaque,
> - void *parseOpaque ATTRIBUTE_UNUSED)
> + void *parseOpaque)
> {
> virQEMUDriverPtr driver = opaque;
> - virQEMUCapsPtr qemuCaps = NULL;
> + virQEMUCapsPtr qemuCaps = parseOpaque;
> virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
> int ret = -1;
>
> - qemuCaps = virQEMUCapsCacheLookup(caps, driver->qemuCapsCache,
> - def->emulator);
> + if (qemuCaps) {
> + virObjectRef(qemuCaps);
> + } else {
> + qemuCaps = virQEMUCapsCacheLookup(caps, driver->qemuCapsCache,
> + def->emulator);
> + }
>
> if (dev->type == VIR_DOMAIN_DEVICE_NET &&
> dev->data.net->type != VIR_DOMAIN_NET_TYPE_HOSTDEV &&
Similar to 5/11, can't you just squash them? (After squashing 4/11 and
6/11, of course).
Or rather just reordering them. I thought 4/11 was similar to 6/11...
Jirka