mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 22:25:25 +00:00
qemu: domain: Tolerate NULL @disk in qemuDomainPrepareDiskSourceData
In some cases we want to prepare a @src which is not meant to belong to a disk and thus does not require us to copy the data. Allow passing in NULL @disk into qemuDomainPrepareDiskSourceData. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
parent
b663201b23
commit
ec042d3731
@ -15082,6 +15082,9 @@ void
|
||||
qemuDomainPrepareDiskSourceData(virDomainDiskDefPtr disk,
|
||||
virStorageSourcePtr src)
|
||||
{
|
||||
if (!disk)
|
||||
return;
|
||||
|
||||
/* transfer properties valid only for the top level image */
|
||||
if (src == disk->src)
|
||||
src->detect_zeroes = disk->detect_zeroes;
|
||||
|
Loading…
Reference in New Issue
Block a user