mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemu: parse: Allocate disk definition with private data
Use virDomainDiskDefNew instead of VIR_ALLOC in qemuParseCommandLineDisk. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1510781
This commit is contained in:
parent
9249187f5b
commit
994c49ac34
@ -658,10 +658,8 @@ qemuParseCommandLineDisk(virDomainXMLOptionPtr xmlopt,
|
|||||||
0) < 0)
|
0) < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (VIR_ALLOC(def) < 0)
|
if (!(def = virDomainDiskDefNew(xmlopt)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
if (VIR_ALLOC(def->src) < 0)
|
|
||||||
goto error;
|
|
||||||
|
|
||||||
if (qemuDomainIsPSeries(dom))
|
if (qemuDomainIsPSeries(dom))
|
||||||
def->bus = VIR_DOMAIN_DISK_BUS_SCSI;
|
def->bus = VIR_DOMAIN_DISK_BUS_SCSI;
|
||||||
|
Loading…
Reference in New Issue
Block a user