diff options
author | Alexey Kardashevskiy <aik@ozlabs.ru> | 2013-04-17 17:49:00 +1000 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-04-17 10:24:11 -0500 |
commit | 95e2af98d4edb59780e47da2085ea9133f6466bb (patch) | |
tree | 65a1e286ad73971469614ca79d478e09f77ad9fb | |
parent | bd5ac20325ed67eb8f1af719d76aad6ad80e5697 (diff) |
qbus: remove wrong error messages
The existing code shows the "Bus '%s' is full" message even if name
is specified and different from bus->name (i.e. match=0).
The patch excludes unnecessary error message.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Message-id: 1366184940-13516-1-git-send-email-aik@ozlabs.ru
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r-- | qdev-monitor.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/qdev-monitor.c b/qdev-monitor.c index 73d79461db..2cb5600d63 100644 --- a/qdev-monitor.c +++ b/qdev-monitor.c @@ -292,11 +292,9 @@ static BusState *qbus_find_recursive(BusState *bus, const char *name, if (name && (strcmp(bus->name, name) != 0)) { match = 0; - } - if (bus_typename && !object_dynamic_cast(OBJECT(bus), bus_typename)) { + } else if (bus_typename && !object_dynamic_cast(OBJECT(bus), bus_typename)) { match = 0; - } - if ((bus_class->max_dev != 0) && (bus_class->max_dev <= bus->max_index)) { + } else 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", |