提交 29bd350b 编写于 作者: J Ján Tomko

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'
上级 11fc1bea
......@@ -4175,6 +4175,9 @@ qemuBuildMemballoonDevStr(virDomainMemballoonDefPtr dev,
virBufferAddLit(&buf, "virtio-balloon-ccw");
break;
default:
virReportError(VIR_ERR_XML_ERROR,
_("memballoon unsupported with address type '%s'"),
virDomainDeviceAddressTypeToString(dev->info.type));
goto error;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册