mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 09:17:52 +03:00
qemu: Fix error message when PCI bridge has index <= bus
Commit ff2126225d
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
This commit is contained in:
parent
3ba93c754b
commit
c7289cf3b5
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user