From: Laine Stump Date: Wed, 12 Oct 2016 19:24:57 +0000 (-0400) Subject: qemu: change first arg of qemuDomainAttachChrDeviceAssignAddr() X-Git-Tag: v2.4.0-rc1~55 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dbe481a14a4c2837352b4a2179167644379fc99c;p=thirdparty%2Flibvirt.git 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. --- diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index bc837715a7..6b4a7ea7f6 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -1636,10 +1636,11 @@ qemuDomainChrRemove(virDomainDefPtr vmdef, } static int -qemuDomainAttachChrDeviceAssignAddr(virDomainDefPtr def, - qemuDomainObjPrivatePtr priv, +qemuDomainAttachChrDeviceAssignAddr(virDomainObjPtr vm, virDomainChrDefPtr chr) { + virDomainDefPtr def = vm->def; + qemuDomainObjPrivatePtr priv = vm->privateData; int ret = -1; virDomainVirtioSerialAddrSetPtr vioaddrs = NULL; @@ -1715,7 +1716,7 @@ int qemuDomainAttachChrDevice(virQEMUDriverPtr driver, if (qemuAssignDeviceChrAlias(vmdef, chr, -1) < 0) goto cleanup; - if ((rc = qemuDomainAttachChrDeviceAssignAddr(vm->def, priv, chr)) < 0) + if ((rc = qemuDomainAttachChrDeviceAssignAddr(vm, chr)) < 0) goto cleanup; if (rc == 1) need_release = true;