To allow converting the pflash drives to blockdev we will need a
virStorageSource to allow using our helpers. Temporarily prior to
coverting loader data to a virStorageSoruce add private data which will
house this.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_domain.c | 5 +++++
src/qemu/qemu_domain.h | 6 ++++++
2 files changed, 11 insertions(+)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index e14b414518..0285669b24 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -2167,6 +2167,11 @@ qemuDomainObjPrivateDataClear(qemuDomainObjPrivatePtr priv)
virHashRemoveAll(priv->blockjobs);
virHashRemoveAll(priv->dbusVMStates);
+
+ virObjectUnref(priv->pflash0);
+ priv->pflash0 = NULL;
+ virObjectUnref(priv->pflash1);
+ priv->pflash1 = NULL;
}
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
index 98a9540275..a545edb022 100644
--- a/src/qemu/qemu_domain.h
+++ b/src/qemu/qemu_domain.h
@@ -397,6 +397,12 @@ struct _qemuDomainObjPrivate {
virHashTablePtr dbusVMStates;
bool disableSlirp;
+
+ /* Until we add full support for backing chains for pflash drives, these
+ * pointers hold the temporary virStorageSources for creating the -blockdev
+ * commandline for pflash drives. */
+ virStorageSourcePtr pflash0;
+ virStorageSourcePtr pflash1;
};
#define QEMU_DOMAIN_PRIVATE(vm) \
--
2.23.0