提交 c7289cf3 编写于 作者: A Andrea Bolognani

qemu: Fix error message when PCI bridge has index <= bus

Commit ff212622 changed the error message to be more
detailed about the failure at hand; however, while the new
error message claims that "bus must be <= index", the error
message is displayed if "idx <= addr->bus", ie. when bus
is larger than or *equal to* index.

Change the error message to report the correct constraint,
and format it in a way that mirrors the check exactly to
make it clearer to people reading the code. The new error
message reads "index must be larger than bus".

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1339900
上级 3ba93c75
......@@ -1587,14 +1587,15 @@ qemuDomainAssignPCIAddresses(virDomainDefPtr def,
break;
}
/* check if every PCI bridge controller's ID is greater than
/* check if every PCI bridge controller's index is larger than
* the bus it is placed onto
*/
if (cont->model == VIR_DOMAIN_CONTROLLER_MODEL_PCI_BRIDGE &&
idx <= addr->bus) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("PCI controller at index %d (0x%02x) has "
"bus='0x%02x', but bus must be <= index"),
"bus='0x%02x', but index must be "
"larger than bus"),
idx, idx, addr->bus);
goto cleanup;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册