[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC 1/2] qbus_find_recursive(): don't abort search for nam
From: |
Laszlo Ersek |
Subject: |
[Qemu-devel] [RFC 1/2] qbus_find_recursive(): don't abort search for named bus on full bus node |
Date: |
Thu, 31 Jan 2013 16:42:24 +0100 |
The bus we're looking for could be in the sub-tree rooted at the node
being checked; don't skip looping over the children.
Signed-off-by: Laszlo Ersek <address@hidden>
---
hw/qdev-monitor.c | 10 +---------
1 files changed, 1 insertions(+), 9 deletions(-)
diff --git a/hw/qdev-monitor.c b/hw/qdev-monitor.c
index 4e2a92b..34f5014 100644
--- a/hw/qdev-monitor.c
+++ b/hw/qdev-monitor.c
@@ -295,15 +295,7 @@ static BusState *qbus_find_recursive(BusState *bus, const
char *name,
match = 0;
}
if ((bus_class->max_dev != 0) && (bus_class->max_dev <= bus->max_index)) {
- if (name != NULL) {
- /* bus was explicitly specified: return an error. */
- qerror_report(ERROR_CLASS_GENERIC_ERROR, "Bus '%s' is full",
- bus->name);
- return NULL;
- } else {
- /* bus was not specified: try to find another one. */
- match = 0;
- }
+ match = 0;
}
if (match) {
return bus;
--
1.7.1
Re: [Qemu-devel] traversal termination in qbus_find_recursive() due to "max_dev", Laszlo Ersek, 2013/01/31
[Qemu-devel] [RFC 2/2] qbus_find_recursive(): the "free slots" constraint needs a dedicated error, Laszlo Ersek, 2013/01/31