The function is no longer used once we setup per-hostdev data.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_domain.c | 50 ------------------------------------------
src/qemu/qemu_domain.h | 4 ----
2 files changed, 54 deletions(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 1289201764..a751d0c205 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -1381,56 +1381,6 @@ qemuDomainSecretHostdevDestroy(virDomainHostdevDefPtr hostdev)
}
-/* qemuDomainSecretHostdevPrepare:
- * @priv: pointer to domain private object
- * @hostdev: Pointer to a hostdev definition
- *
- * For the right host device, generate the qemuDomainSecretInfo structure.
- *
- * Returns 0 on success, -1 on failure
- */
-int
-qemuDomainSecretHostdevPrepare(qemuDomainObjPrivatePtr priv,
- virDomainHostdevDefPtr hostdev)
-{
- if (virHostdevIsSCSIDevice(hostdev)) {
- virDomainHostdevSubsysSCSIPtr scsisrc = &hostdev->source.subsys.u.scsi;
- virDomainHostdevSubsysSCSIiSCSIPtr iscsisrc = &scsisrc->u.iscsi;
- virStorageSourcePtr src = iscsisrc->src;
-
- if (scsisrc->protocol == VIR_DOMAIN_HOSTDEV_SCSI_PROTOCOL_TYPE_ISCSI
&&
- src->auth) {
- bool iscsiHasPS = virQEMUCapsGet(priv->qemuCaps,
QEMU_CAPS_ISCSI_PASSWORD_SECRET);
- virSecretUsageType usageType = VIR_SECRET_USAGE_TYPE_ISCSI;
- qemuDomainStorageSourcePrivatePtr srcPriv;
-
- if (!(src->privateData = qemuDomainStorageSourcePrivateNew()))
- return -1;
-
- srcPriv = QEMU_DOMAIN_STORAGE_SOURCE_PRIVATE(src);
-
- if (!qemuDomainSupportsEncryptedSecret(priv) || !iscsiHasPS) {
- srcPriv->secinfo = qemuDomainSecretInfoNewPlain(usageType,
-
src->auth->username,
-
&src->auth->seclookupdef);
- } else {
- srcPriv->secinfo = qemuDomainSecretAESSetupFromSecret(priv,
-
hostdev->info->alias,
- NULL,
- usageType,
-
src->auth->username,
-
&src->auth->seclookupdef);
- }
-
- if (!srcPriv->secinfo)
- return -1;
- }
- }
-
- return 0;
-}
-
-
void
qemuDomainSecretChardevDestroy(virDomainChrSourceDefPtr dev)
{
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
index 6abd896119..77d6bfc810 100644
--- a/src/qemu/qemu_domain.h
+++ b/src/qemu/qemu_domain.h
@@ -851,10 +851,6 @@ qemuDomainSecretInfoTLSNew(qemuDomainObjPrivatePtr priv,
void qemuDomainSecretHostdevDestroy(virDomainHostdevDefPtr disk)
ATTRIBUTE_NONNULL(1);
-int qemuDomainSecretHostdevPrepare(qemuDomainObjPrivatePtr priv,
- virDomainHostdevDefPtr hostdev)
- ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
-
void qemuDomainSecretChardevDestroy(virDomainChrSourceDefPtr dev)
ATTRIBUTE_NONNULL(1);
--
2.26.2