diff options
author | 2015-03-11 17:26:31 +0100 | |
---|---|---|
committer | 2015-06-22 18:20:39 +0200 | |
commit | a5ec494e274ddcad6d487e3872e16964ef57e0de (patch) | |
tree | 0dc1b33e0bae10ffbdc0b870166f1e691317b517 /scripts/qapi-commands.py | |
parent | disas: Remove uses of CPU env (diff) | |
download | qemu-a5ec494e274ddcad6d487e3872e16964ef57e0de.tar.xz qemu-a5ec494e274ddcad6d487e3872e16964ef57e0de.zip |
qdev-monitor: Stop error avalanche in qbus_find_recursive()
Reproducer:
$ qemu-system-x86_64 -nodefaults -device virtio-rng-pci -device virtio-rng-pci -device virtio-rng-device,bus=virtio-bus
qemu-system-x86_64: -device virtio-rng-device,bus=virtio-bus: Bus 'virtio-bus' is full
qemu-system-x86_64: -device virtio-rng-device,bus=virtio-bus: Bus 'virtio-bus' is full
qemu-system-x86_64: -device virtio-rng-device,bus=virtio-bus: Bus 'virtio-bus' not found
qbus_find_recursive() reports the "is full" error itself, and leaves
reporting "not found" to its caller. The result is confusion. Write
it a function contract that permits leaving all error reporting to the
caller, and implement it. Update callers to detect and report "is
full".
Screwed up when commit 1395af6 added the max_dev limit and the "is
full" error condition to enforce it.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'scripts/qapi-commands.py')
0 files changed, 0 insertions, 0 deletions