1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-23 21:34:54 +03:00

qemu: domain: Rename qemuDomainSecretDiskCapable

The function checks whether the storage source requires authentication
secret setup. Rename it accordingly.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2018-05-22 09:18:34 +02:00
parent 6a2faa1344
commit a7f49b82bf
3 changed files with 5 additions and 5 deletions

View File

@ -1459,7 +1459,7 @@ qemuDomainSecretDiskDestroy(virDomainDiskDefPtr disk)
bool
qemuDomainSecretDiskCapable(virStorageSourcePtr src)
qemuDomainStorageSourceHasAuth(virStorageSourcePtr src)
{
if (!virStorageSourceIsEmpty(src) &&
virStorageSourceGetActualType(src) == VIR_STORAGE_TYPE_NETWORK &&
@ -1505,7 +1505,7 @@ qemuDomainSecretStorageSourcePrepare(qemuDomainObjPrivatePtr priv,
const char *encalias)
{
qemuDomainStorageSourcePrivatePtr srcPriv;
bool hasAuth = qemuDomainSecretDiskCapable(src);
bool hasAuth = qemuDomainStorageSourceHasAuth(src);
bool hasEnc = qemuDomainDiskHasEncryptionSecret(src);
if (!hasAuth && !hasEnc)

View File

@ -839,7 +839,7 @@ void qemuDomainSecretInfoFree(qemuDomainSecretInfoPtr *secinfo)
void qemuDomainSecretDiskDestroy(virDomainDiskDefPtr disk)
ATTRIBUTE_NONNULL(1);
bool qemuDomainSecretDiskCapable(virStorageSourcePtr src)
bool qemuDomainStorageSourceHasAuth(virStorageSourcePtr src)
ATTRIBUTE_NONNULL(1);
bool qemuDomainDiskHasEncryptionSecret(virStorageSourcePtr src)

View File

@ -3925,7 +3925,7 @@ qemuDomainRemoveDiskDevice(virQEMUDriverPtr driver,
* been removed during cleanup of qemuProcessLaunch. Likewise, libvirtd
* restart wouldn't have them, so no assumption can be made. */
if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_OBJECT_SECRET) &&
qemuDomainSecretDiskCapable(disk->src)) {
qemuDomainStorageSourceHasAuth(disk->src)) {
if (!(objAlias =
qemuDomainGetSecretAESAlias(disk->info.alias, false))) {
@ -4185,7 +4185,7 @@ qemuDomainRemoveHostDevice(virQEMUDriverPtr driver,
* attempt to remove the object as well. */
if (scsisrc->protocol == VIR_DOMAIN_HOSTDEV_SCSI_PROTOCOL_TYPE_ISCSI &&
virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_ISCSI_PASSWORD_SECRET) &&
qemuDomainSecretDiskCapable(iscsisrc->src)) {
qemuDomainStorageSourceHasAuth(iscsisrc->src)) {
if (!(objAlias = qemuDomainGetSecretAESAlias(hostdev->info->alias, false)))
goto cleanup;
}