mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemu: report an error if memballoon has wrong address type
qemuBuildMemballoonDevStr returns NULL if memballoon doesn't have the right address type, but it doesn't report an error, leading to: error: An error occurred, but the cause is unknown Report a helpful error message instead, e.g.: error: XML error: memballoon unsupported with address type 'usb'
This commit is contained in:
parent
11fc1beab6
commit
29bd350bf6
@ -4175,6 +4175,9 @@ qemuBuildMemballoonDevStr(virDomainMemballoonDefPtr dev,
|
|||||||
virBufferAddLit(&buf, "virtio-balloon-ccw");
|
virBufferAddLit(&buf, "virtio-balloon-ccw");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
virReportError(VIR_ERR_XML_ERROR,
|
||||||
|
_("memballoon unsupported with address type '%s'"),
|
||||||
|
virDomainDeviceAddressTypeToString(dev->info.type));
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user