qemu: domain: Rename secrets setup function

Since there's just one type left, we can change the name to a more
generic one.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2021-09-22 09:47:05 +02:00
parent db66d0247a
commit 0151c092fb

View File

@ -1065,7 +1065,7 @@ qemuDomainVideoPrivateDispose(void *obj)
}
/* qemuDomainSecretAESSetup:
/* qemuDomainSecretInfoSetup:
* @priv: pointer to domain private object
* @alias: alias of the secret
* @username: username to use (may be NULL)
@ -1077,7 +1077,7 @@ qemuDomainVideoPrivateDispose(void *obj)
* Returns qemuDomainSecretInfo *filled with the necessary information.
*/
static qemuDomainSecretInfo *
qemuDomainSecretAESSetup(qemuDomainObjPrivate *priv,
qemuDomainSecretInfoSetup(qemuDomainObjPrivate *priv,
const char *alias,
const char *username,
uint8_t *secret,
@ -1117,7 +1117,7 @@ qemuDomainSecretAESSetup(qemuDomainObjPrivate *priv,
/**
* qemuDomainSecretAESSetupFromSecret:
* qemuDomainSecretInfoSetupFromSecret:
* @priv: pointer to domain private object
* @srcalias: Alias of the disk/hostdev used to generate the secret alias
* @secretuse: specific usage for the secret (may be NULL if main object is using it)
@ -1130,7 +1130,7 @@ qemuDomainSecretAESSetup(qemuDomainObjPrivate *priv,
* secret in case if @srcalias requires more secrets for various usage cases.
*/
static qemuDomainSecretInfo *
qemuDomainSecretAESSetupFromSecret(qemuDomainObjPrivate *priv,
qemuDomainSecretInfoSetupFromSecret(qemuDomainObjPrivate *priv,
const char *srcalias,
const char *secretuse,
virSecretUsageType usageType,
@ -1154,7 +1154,7 @@ qemuDomainSecretAESSetupFromSecret(qemuDomainObjPrivate *priv,
&secret, &secretlen) < 0)
return NULL;
secinfo = qemuDomainSecretAESSetup(priv, alias, username, secret, secretlen);
secinfo = qemuDomainSecretInfoSetup(priv, alias, username, secret, secretlen);
virSecureErase(secret, secretlen);
@ -1188,7 +1188,7 @@ qemuDomainSecretInfoTLSNew(qemuDomainObjPrivate *priv,
}
seclookupdef.type = VIR_SECRET_LOOKUP_TYPE_UUID;
return qemuDomainSecretAESSetupFromSecret(priv, srcAlias, NULL,
return qemuDomainSecretInfoSetupFromSecret(priv, srcAlias, NULL,
VIR_SECRET_USAGE_TYPE_TLS,
NULL, &seclookupdef);
}
@ -1244,7 +1244,7 @@ qemuDomainSecretStorageSourcePrepareCookies(qemuDomainObjPrivate *priv,
g_autofree char *secretalias = qemuAliasForSecret(aliasprotocol, "httpcookie");
g_autofree char *cookies = qemuBlockStorageSourceGetCookieString(src);
return qemuDomainSecretAESSetup(priv, secretalias, NULL,
return qemuDomainSecretInfoSetup(priv, secretalias, NULL,
(uint8_t *) cookies, strlen(cookies));
}
@ -1287,7 +1287,7 @@ qemuDomainSecretStorageSourcePrepare(qemuDomainObjPrivate *priv,
if (src->protocol == VIR_STORAGE_NET_PROTOCOL_RBD)
usageType = VIR_SECRET_USAGE_TYPE_CEPH;
if (!(srcPriv->secinfo = qemuDomainSecretAESSetupFromSecret(priv, aliasprotocol,
if (!(srcPriv->secinfo = qemuDomainSecretInfoSetupFromSecret(priv, aliasprotocol,
"auth",
usageType,
src->auth->username,
@ -1296,7 +1296,7 @@ qemuDomainSecretStorageSourcePrepare(qemuDomainObjPrivate *priv,
}
if (hasEnc) {
if (!(srcPriv->encinfo = qemuDomainSecretAESSetupFromSecret(priv, aliasformat,
if (!(srcPriv->encinfo = qemuDomainSecretInfoSetupFromSecret(priv, aliasformat,
"encryption",
VIR_SECRET_USAGE_TYPE_VOLUME,
NULL,
@ -10740,7 +10740,7 @@ qemuDomainPrepareHostdev(virDomainHostdevDef *hostdev,
virSecretUsageType usageType = VIR_SECRET_USAGE_TYPE_ISCSI;
qemuDomainStorageSourcePrivate *srcPriv = qemuDomainStorageSourcePrivateFetch(src);
if (!(srcPriv->secinfo = qemuDomainSecretAESSetupFromSecret(priv,
if (!(srcPriv->secinfo = qemuDomainSecretInfoSetupFromSecret(priv,
backendalias,
NULL,
usageType,