[libvirt] [PATCH 18/19] qemu: Add new secret info type

John Ferlan jferlan at redhat.com
Tue Jun 14 00:27:57 UTC 2016


Add 'encinfo' to the extended disk structure. This will contain the
encryption secret (if present).

Signed-off-by: John Ferlan <jferlan at redhat.com>
---
 src/qemu/qemu_domain.c | 1 +
 src/qemu/qemu_domain.h | 5 +++++
 2 files changed, 6 insertions(+)

diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 2c583d8..c288fa0 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -758,6 +758,7 @@ qemuDomainDiskPrivateDispose(void *obj)
     qemuDomainDiskPrivatePtr priv = obj;
 
     qemuDomainSecretInfoFree(&priv->secinfo);
+    qemuDomainSecretInfoFree(&priv->encinfo);
 }
 
 
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
index 2443e97..fa536e0 100644
--- a/src/qemu/qemu_domain.h
+++ b/src/qemu/qemu_domain.h
@@ -299,6 +299,11 @@ struct _qemuDomainDiskPrivate {
      * NB: *not* to be written to qemu domain object XML */
     qemuDomainSecretInfoPtr secinfo;
 
+    /* for storage devices using encryption/secret
+     * Can have both <auth> and <encryption> for some disks
+     * NB:*not* to be written to qemu domain object XML */
+    qemuDomainSecretInfoPtr encinfo;
+
     /* information about the device */
     bool tray; /* device has tray */
     bool removable; /* device media can be removed/changed */
-- 
2.5.5




More information about the libvir-list mailing list