diff options
author | Andrea Bolognani <abologna@redhat.com> | 2016-05-23 18:00:36 +0200 |
---|---|---|
committer | Andrea Bolognani <abologna@redhat.com> | 2016-05-26 16:24:04 +0200 |
commit | c7289cf3b59aacd08dbc9047eda52c03b2837653 (patch) | |
tree | d311b2a77e06590da279ea5345407f5ae3f9b92a | |
parent | 3ba93c754bc875a2b5f1baf65ca5ba704beb0bc5 (diff) | |
download | libvirt-c7289cf3b59aacd08dbc9047eda52c03b2837653.tar.gz |
qemu: Fix error message when PCI bridge has index <= bus
Commit ff2126225df0 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
-rw-r--r-- | src/qemu/qemu_domain_address.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index e9619a246a..ca3adc0b72 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -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; } |