Skip to content

Commit

Permalink
qbus: remove wrong error messages
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
aik authored and Anthony Liguori committed Apr 17, 2013
1 parent bd5ac20 commit 95e2af9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions qdev-monitor.c
Expand Up @@ -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",
Expand Down

0 comments on commit 95e2af9

Please sign in to comment.