]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: domain: Store virStorageSources representing pflash backing
authorPeter Krempa <pkrempa@redhat.com>
Fri, 15 Nov 2019 15:23:44 +0000 (16:23 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 22 Nov 2019 07:32:25 +0000 (08:32 +0100)
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@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/qemu/qemu_domain.c
src/qemu/qemu_domain.h

index d56dfa9f00964c570755fa013e312ab8e857f9ff..174c780fed8efdf1203287ee2a64e5aab8b0f67e 100644 (file)
@@ -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;
 }
 
 
index 98a9540275b53ae395022b0bcc1661b39c1de154..a545edb022debc3fb8a0b184b3d5a4e58c3b0455 100644 (file)
@@ -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) \