On 11/25/19 7:53 AM, Peter Krempa wrote: > Start aggregating all capability post-processing code in one place. > > The comment was modified while moving it as it was mentioning floppies > which are no longer clearing the blockdev capability. > > Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> > --- > src/qemu/qemu_process.c | 17 +++++++++-------- > 1 file changed, 9 insertions(+), 8 deletions(-) > > diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c > index ad3129c7bd..f05c1d637f 100644 > --- a/src/qemu/qemu_process.c > +++ b/src/qemu/qemu_process.c > @@ -5502,6 +5502,7 @@ qemuProcessPrepareQEMUCaps(virDomainObjPtr vm, > virFileCachePtr qemuCapsCache) > { > qemuDomainObjPrivatePtr priv = vm->privateData; > + size_t i; > > virObjectUnref(priv->qemuCaps); > if (!(priv->qemuCaps = virQEMUCapsCacheLookupCopy(qemuCapsCache, > @@ -5510,6 +5511,14 @@ qemuProcessPrepareQEMUCaps(virDomainObjPtr vm, > vm->def->os.machine))) > return -1; > > + /* clear the 'blockdev' capability for VMs which have disks that need -drive */ > + for (i = 0; i < vm->def->ndisks; i++) { > + if (qemuDiskBusNeedsDriveArg(vm->def->disks[i]->bus)) { > + virQEMUCapsClear(priv->qemuCaps, QEMU_CAPS_BLOCKDEV); > + break; > + } > + } > + > return 0; > } > > @@ -6273,14 +6282,6 @@ qemuProcessPrepareDomain(virQEMUDriverPtr driver, > > qemuProcessPrepareAllowReboot(vm); > > - /* clear the 'blockdev' capability for VMs which have disks that need > - * -drive or which have floppies where we can't reliably get the QOM path */ > - for (i = 0; i < vm->def->ndisks; i++) { > - if (qemuDiskBusNeedsDriveArg(vm->def->disks[i]->bus)) { > - virQEMUCapsClear(priv->qemuCaps, QEMU_CAPS_BLOCKDEV); > - break; > - } > - } > > /* > * Normally PCI addresses are assigned in the virDomainCreate > This last hunk should remove a newline too Thanks, Cole -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list