Let's adjust some of the indentation in the hotplug code for the upcoming vhost-scsi support, so we can keep existing code separate from the new code that we'll add. Signed-off-by: Eric Farman <farman@xxxxxxxxxxxxxxxxxx> Reviewed-by: Bjoern Walk <bwalk@xxxxxxxxxxxxxxxxxx> Reviewed-by: Marc Hartmayer <mhartmay@xxxxxxxxxxxxxxxxxx> Reviewed-by: Boris Fiuczynski <fiuczy@xxxxxxxxxxxxxxxxxx> --- src/qemu/qemu_hotplug.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 4e4bf82..02f7017 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -2048,23 +2048,25 @@ qemuDomainAttachHostSCSIDevice(virConnectPtr conn, if (qemuDomainSecretHostdevPrepare(conn, priv, hostdev) < 0) goto cleanup; - if (!(drvstr = qemuBuildSCSIHostdevDrvStr(hostdev))) - goto cleanup; + if (hostdev->source.subsys.u.scsi.protocol != VIR_DOMAIN_HOSTDEV_SCSI_PROTOCOL_TYPE_VHOST) { + if (!(drvstr = qemuBuildSCSIHostdevDrvStr(hostdev))) + goto cleanup; - if (!(devstr = qemuBuildSCSIHostdevDevStr(vm->def, hostdev, priv->qemuCaps))) - goto cleanup; + if (!(devstr = qemuBuildSCSIHostdevDevStr(vm->def, hostdev, priv->qemuCaps))) + goto cleanup; - if (VIR_REALLOC_N(vm->def->hostdevs, vm->def->nhostdevs + 1) < 0) - goto cleanup; + if (VIR_REALLOC_N(vm->def->hostdevs, vm->def->nhostdevs + 1) < 0) + goto cleanup; - qemuDomainObjEnterMonitor(driver, vm); + qemuDomainObjEnterMonitor(driver, vm); - if (qemuMonitorAddDrive(priv->mon, drvstr) < 0) - goto exit_monitor; - driveAdded = true; + if (qemuMonitorAddDrive(priv->mon, drvstr) < 0) + goto exit_monitor; + driveAdded = true; - if (qemuMonitorAddDevice(priv->mon, devstr) < 0) - goto exit_monitor; + if (qemuMonitorAddDevice(priv->mon, devstr) < 0) + goto exit_monitor; + } if (qemuDomainObjExitMonitor(driver, vm) < 0) goto cleanup; -- 1.9.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list