This function returns the name of the secdriver. Since the name
is invariant we don't really need to lock the manager - it won't
change.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/security/security_manager.c | 7 +++++++
src/security/security_manager.h | 1 +
2 files changed, 8 insertions(+)
diff --git a/src/security/security_manager.c b/src/security/security_manager.c
index c513740a13..99281821d9 100644
--- a/src/security/security_manager.c
+++ b/src/security/security_manager.c
@@ -332,6 +332,13 @@ virSecurityManagerGetVirtDriver(virSecurityManagerPtr mgr)
}
+const char *
+virSecurityManagerGetDriver(virSecurityManagerPtr mgr)
+{
+ return mgr->drv->name;
+}
+
+
const char *
virSecurityManagerGetDOI(virSecurityManagerPtr mgr)
{
diff --git a/src/security/security_manager.h b/src/security/security_manager.h
index 306de92978..f835356b7e 100644
--- a/src/security/security_manager.h
+++ b/src/security/security_manager.h
@@ -80,6 +80,7 @@ void virSecurityManagerTransactionAbort(virSecurityManagerPtr mgr);
void *virSecurityManagerGetPrivateData(virSecurityManagerPtr mgr);
+const char *virSecurityManagerGetDriver(virSecurityManagerPtr mgr);
const char *virSecurityManagerGetVirtDriver(virSecurityManagerPtr mgr);
const char *virSecurityManagerGetDOI(virSecurityManagerPtr mgr);
const char *virSecurityManagerGetModel(virSecurityManagerPtr mgr);
--
2.21.0