mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 06:50:22 +03:00
Do not try to release virtio serial addresses
Return 0 instead of 1, so that qemuDomainAttachChrDevice does not assume the address neeeds to be released on error. No functional change, since qemuDomainReleaseDeviceAddress has been a noop for virtio serial addresses since the address cache was removed in commit 19a148b.
This commit is contained in:
parent
00c5386c86
commit
244ebb8f2b
@ -1756,6 +1756,10 @@ qemuDomainChrRemove(virDomainDefPtr vmdef,
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Returns 1 if the address will need to be released later,
|
||||
* -1 on error
|
||||
* 0 otherwise
|
||||
*/
|
||||
static int
|
||||
qemuDomainAttachChrDeviceAssignAddr(virDomainObjPtr vm,
|
||||
virDomainChrDefPtr chr)
|
||||
@ -1767,7 +1771,7 @@ qemuDomainAttachChrDeviceAssignAddr(virDomainObjPtr vm,
|
||||
chr->targetType == VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_VIRTIO) {
|
||||
if (virDomainVirtioSerialAddrAutoAssign(def, &chr->info, true) < 0)
|
||||
return -1;
|
||||
return 1;
|
||||
return 0;
|
||||
|
||||
} else if (chr->deviceType == VIR_DOMAIN_CHR_DEVICE_TYPE_SERIAL &&
|
||||
chr->targetType == VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_PCI) {
|
||||
@ -1786,7 +1790,7 @@ qemuDomainAttachChrDeviceAssignAddr(virDomainObjPtr vm,
|
||||
chr->targetType == VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_VIRTIO) {
|
||||
if (virDomainVirtioSerialAddrAutoAssign(def, &chr->info, false) < 0)
|
||||
return -1;
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (chr->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_VIRTIO_SERIAL ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user