提交 a7f49b82 编写于 作者: P Peter Krempa

qemu: domain: Rename qemuDomainSecretDiskCapable

The function checks whether the storage source requires authentication
secret setup. Rename it accordingly.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 6a2faa13
...@@ -1459,7 +1459,7 @@ qemuDomainSecretDiskDestroy(virDomainDiskDefPtr disk) ...@@ -1459,7 +1459,7 @@ qemuDomainSecretDiskDestroy(virDomainDiskDefPtr disk)
bool bool
qemuDomainSecretDiskCapable(virStorageSourcePtr src) qemuDomainStorageSourceHasAuth(virStorageSourcePtr src)
{ {
if (!virStorageSourceIsEmpty(src) && if (!virStorageSourceIsEmpty(src) &&
virStorageSourceGetActualType(src) == VIR_STORAGE_TYPE_NETWORK && virStorageSourceGetActualType(src) == VIR_STORAGE_TYPE_NETWORK &&
...@@ -1505,7 +1505,7 @@ qemuDomainSecretStorageSourcePrepare(qemuDomainObjPrivatePtr priv, ...@@ -1505,7 +1505,7 @@ qemuDomainSecretStorageSourcePrepare(qemuDomainObjPrivatePtr priv,
const char *encalias) const char *encalias)
{ {
qemuDomainStorageSourcePrivatePtr srcPriv; qemuDomainStorageSourcePrivatePtr srcPriv;
bool hasAuth = qemuDomainSecretDiskCapable(src); bool hasAuth = qemuDomainStorageSourceHasAuth(src);
bool hasEnc = qemuDomainDiskHasEncryptionSecret(src); bool hasEnc = qemuDomainDiskHasEncryptionSecret(src);
if (!hasAuth && !hasEnc) if (!hasAuth && !hasEnc)
......
...@@ -839,7 +839,7 @@ void qemuDomainSecretInfoFree(qemuDomainSecretInfoPtr *secinfo) ...@@ -839,7 +839,7 @@ void qemuDomainSecretInfoFree(qemuDomainSecretInfoPtr *secinfo)
void qemuDomainSecretDiskDestroy(virDomainDiskDefPtr disk) void qemuDomainSecretDiskDestroy(virDomainDiskDefPtr disk)
ATTRIBUTE_NONNULL(1); ATTRIBUTE_NONNULL(1);
bool qemuDomainSecretDiskCapable(virStorageSourcePtr src) bool qemuDomainStorageSourceHasAuth(virStorageSourcePtr src)
ATTRIBUTE_NONNULL(1); ATTRIBUTE_NONNULL(1);
bool qemuDomainDiskHasEncryptionSecret(virStorageSourcePtr src) bool qemuDomainDiskHasEncryptionSecret(virStorageSourcePtr src)
......
...@@ -3925,7 +3925,7 @@ qemuDomainRemoveDiskDevice(virQEMUDriverPtr driver, ...@@ -3925,7 +3925,7 @@ qemuDomainRemoveDiskDevice(virQEMUDriverPtr driver,
* been removed during cleanup of qemuProcessLaunch. Likewise, libvirtd * been removed during cleanup of qemuProcessLaunch. Likewise, libvirtd
* restart wouldn't have them, so no assumption can be made. */ * restart wouldn't have them, so no assumption can be made. */
if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_OBJECT_SECRET) && if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_OBJECT_SECRET) &&
qemuDomainSecretDiskCapable(disk->src)) { qemuDomainStorageSourceHasAuth(disk->src)) {
if (!(objAlias = if (!(objAlias =
qemuDomainGetSecretAESAlias(disk->info.alias, false))) { qemuDomainGetSecretAESAlias(disk->info.alias, false))) {
...@@ -4185,7 +4185,7 @@ qemuDomainRemoveHostDevice(virQEMUDriverPtr driver, ...@@ -4185,7 +4185,7 @@ qemuDomainRemoveHostDevice(virQEMUDriverPtr driver,
* attempt to remove the object as well. */ * attempt to remove the object as well. */
if (scsisrc->protocol == VIR_DOMAIN_HOSTDEV_SCSI_PROTOCOL_TYPE_ISCSI && if (scsisrc->protocol == VIR_DOMAIN_HOSTDEV_SCSI_PROTOCOL_TYPE_ISCSI &&
virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_ISCSI_PASSWORD_SECRET) && virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_ISCSI_PASSWORD_SECRET) &&
qemuDomainSecretDiskCapable(iscsisrc->src)) { qemuDomainStorageSourceHasAuth(iscsisrc->src)) {
if (!(objAlias = qemuDomainGetSecretAESAlias(hostdev->info->alias, false))) if (!(objAlias = qemuDomainGetSecretAESAlias(hostdev->info->alias, false)))
goto cleanup; goto cleanup;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册