diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index a085573a83..fbcd5421e6 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -1935,7 +1935,7 @@ qemuBuildDiskDeviceProps(const virDomainDef *def, if (virStorageSourceGetActualType(disk->src) == VIR_STORAGE_TYPE_VHOST_USER) { chardev = qemuDomainGetVhostUserChrAlias(disk->info.alias); } else { - if (qemuDomainDiskGetBackendAlias(disk, qemuCaps, &drive) < 0) + if (qemuDomainDiskGetBackendAlias(disk, &drive) < 0) return NULL; } diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 0a60a59c8f..251ec60688 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -7717,7 +7717,8 @@ qemuDomainDetermineDiskChain(virQEMUDriver *driver, * Returns the pointer to the node-name of the topmost layer used by @disk as * backend. Currently returns the nodename of the copy-on-read filter if enabled * or the nodename of the top image's format driver. Empty disks return NULL. - * This must be used only when VIR_QEMU_CAPS_BLOCKDEV is enabled. + * This must be used only with disks instantiated via -blockdev (thus not + * for SD cards). */ const char * qemuDomainDiskGetTopNodename(virDomainDiskDef *disk) @@ -7737,7 +7738,6 @@ qemuDomainDiskGetTopNodename(virDomainDiskDef *disk) /** * qemuDomainDiskGetBackendAlias: * @disk: disk definition - * @qemuCaps: emulator capabilities * @backendAlias: filled with the alias of the disk storage backend * * Returns the correct alias for the disk backend. This may be the alias of @@ -7750,13 +7750,11 @@ qemuDomainDiskGetTopNodename(virDomainDiskDef *disk) */ int qemuDomainDiskGetBackendAlias(virDomainDiskDef *disk, - virQEMUCaps *qemuCaps, char **backendAlias) { *backendAlias = NULL; - if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_BLOCKDEV) || - qemuDiskBusIsSD(disk->bus)) { + if (qemuDiskBusIsSD(disk->bus)) { if (!(*backendAlias = qemuAliasDiskDriveFromDisk(disk))) return -1; @@ -10864,8 +10862,7 @@ qemuDomainPrepareDiskSource(virDomainDiskDef *disk, disk->src->format = VIR_STORAGE_FILE_RAW; } - if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV) && - !qemuDiskBusIsSD(disk->bus)) { + if (!qemuDiskBusIsSD(disk->bus)) { if (qemuDomainPrepareDiskSourceBlockdev(disk, priv, cfg) < 0) return -1; } else { diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index 3ff77b7e02..d34d5f5861 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -732,10 +732,8 @@ qemuDomainDiskGetTopNodename(virDomainDiskDef *disk) ATTRIBUTE_NONNULL(1); int qemuDomainDiskGetBackendAlias(virDomainDiskDef *disk, - virQEMUCaps *qemuCaps, char **backendAlias) - ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) - ATTRIBUTE_NONNULL(3) G_GNUC_WARN_UNUSED_RESULT; + ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) G_GNUC_WARN_UNUSED_RESULT; int qemuDomainStorageSourceChainAccessAllow(virQEMUDriver *driver, virDomainObj *vm, diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 1d54d202ee..83f189ba5e 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -475,7 +475,7 @@ qemuDomainChangeMediaBlockdev(virDomainObj *vm, if (!(newbackend = qemuBuildStorageSourceChainAttachPrepareBlockdev(newsrc))) return -1; - if (qemuDomainDiskGetBackendAlias(disk, priv->qemuCaps, &nodename) < 0) + if (qemuDomainDiskGetBackendAlias(disk, &nodename) < 0) return -1; }