qemu: domain: Store virStorageSources representing pflash backing

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>
This commit is contained in:
Peter Krempa 2019-11-15 16:23:44 +01:00
parent 316223b6ad
commit 07675b0100
2 changed files with 11 additions and 0 deletions

View 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;
}

View 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) \