Remove the generic frontend-less -drive code from qemuBuildDriveStr by assuming that we support only blockdev-enabled qemus. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/qemu/qemu_command.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 865464a772..aec9e7415f 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -2039,17 +2039,7 @@ qemuBuildDriveStr(virDomainDiskDef *disk) if (qemuBuildDriveSourceStr(disk, &opt) < 0) return NULL; - if (!qemuDiskBusIsSD(disk->bus)) { - g_autofree char *drivealias = qemuAliasDiskDriveFromDisk(disk); - if (!drivealias) - return NULL; - - virBufferAddLit(&opt, "if=none"); - virBufferAsprintf(&opt, ",id=%s", drivealias); - } else { - virBufferAsprintf(&opt, "if=sd,index=%d", - virDiskNameToIndex(disk->dst)); - } + virBufferAsprintf(&opt, "if=sd,index=%d", virDiskNameToIndex(disk->dst)); if (disk->src->readonly) virBufferAddLit(&opt, ",readonly=on"); @@ -2522,8 +2512,7 @@ qemuBuildDiskSourceCommandLine(virCommand *cmd, if (virStorageSourceGetActualType(disk->src) == VIR_STORAGE_TYPE_VHOST_USER) { if (!(data = qemuBuildStorageSourceChainAttachPrepareChardev(disk))) return -1; - } else if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_BLOCKDEV) && - !qemuDiskBusIsSD(disk->bus)) { + } else if (!qemuDiskBusIsSD(disk->bus)) { if (virStorageSourceIsEmpty(disk->src)) return 0; -- 2.36.1