
On Wed, Mar 01, 2017 at 18:30:19 -0500, John Ferlan wrote:
Create a helper which will create the secinfo used for disks, hostdevs, and chardevs.
Signed-off-by: John Ferlan <jferlan@redhat.com> --- src/qemu/qemu_domain.c | 137 +++++++++++++++++++++++++------------------------ 1 file changed, 71 insertions(+), 66 deletions(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index c187214..f8ac0f4 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -1112,6 +1112,52 @@ qemuDomainSecretSetup(virConnectPtr conn, }
+/* qemuDomainSecretInfoNew: + * @conn: Pointer to connection + * @priv: pointer to domain private object + * @srcAlias: Alias base to use for TLS object + * @lookupType: Type of secret lookup
You forgot to change the documentation here.
+ * @username: username for plain secrets (only) + * @looupdef: lookup def describing secret + * @isLuks: boolean for luks lookup + * + * Helper function to create a secinfo to be used for secinfo consumers + * + * Returns @secinfo on success, NULL on failure. Caller is responsible + * to eventually free @secinfo. + */ +static qemuDomainSecretInfoPtr +qemuDomainSecretInfoNew(virConnectPtr conn, + qemuDomainObjPrivatePtr priv, + const char *srcAlias, + virSecretUsageType secretUsageType,
secretUsageType seems to be a bit too verbose given that we are in a *SecretInfoNew function. Keep it if you like it or change it to usageType.
+ const char *username, + virSecretLookupTypeDefPtr lookupDef, + bool isLuks) ...
ACK Jirka