mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemu: change first arg of qemuDomainAttachChrDeviceAssignAddr()
from virDomainDefPtr to virDomainObjPtr so that the function has access to the other parts of the virDomainObjPtr. Take advantage of this by removing the "priv" arg and retrieving it from the virDomainObjPtr instead. No functional change.
This commit is contained in:
parent
116564e3b0
commit
dbe481a14a
@ -1636,10 +1636,11 @@ qemuDomainChrRemove(virDomainDefPtr vmdef,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
qemuDomainAttachChrDeviceAssignAddr(virDomainDefPtr def,
|
qemuDomainAttachChrDeviceAssignAddr(virDomainObjPtr vm,
|
||||||
qemuDomainObjPrivatePtr priv,
|
|
||||||
virDomainChrDefPtr chr)
|
virDomainChrDefPtr chr)
|
||||||
{
|
{
|
||||||
|
virDomainDefPtr def = vm->def;
|
||||||
|
qemuDomainObjPrivatePtr priv = vm->privateData;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
virDomainVirtioSerialAddrSetPtr vioaddrs = NULL;
|
virDomainVirtioSerialAddrSetPtr vioaddrs = NULL;
|
||||||
|
|
||||||
@ -1715,7 +1716,7 @@ int qemuDomainAttachChrDevice(virQEMUDriverPtr driver,
|
|||||||
if (qemuAssignDeviceChrAlias(vmdef, chr, -1) < 0)
|
if (qemuAssignDeviceChrAlias(vmdef, chr, -1) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if ((rc = qemuDomainAttachChrDeviceAssignAddr(vm->def, priv, chr)) < 0)
|
if ((rc = qemuDomainAttachChrDeviceAssignAddr(vm, chr)) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
if (rc == 1)
|
if (rc == 1)
|
||||||
need_release = true;
|
need_release = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user