From: Peter Krempa Date: Fri, 15 Nov 2019 15:23:44 +0000 (+0100) Subject: qemu: domain: Store virStorageSources representing pflash backing X-Git-Tag: v5.10.0-rc1~48 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=07675b0100da4b26a84bc53a7480b4293eb52543;p=thirdparty%2Flibvirt.git 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 Reviewed-by: Daniel P. Berrangé --- diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index d56dfa9f00..174c780fed 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) \