summaryrefslogtreecommitdiffstats
path: root/qdev-monitor.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2015-12-17 17:35:14 +0100
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:28:24 -0600
commit216d90522decdffee1ee42e339f914fb10307719 (patch)
treeceefae56cb730c15a074e3b8de934e951546522e /qdev-monitor.c
parent61710b3381fd4c8230aead5954487560a24f1cd9 (diff)
downloadhqemu-216d90522decdffee1ee42e339f914fb10307719.zip
hqemu-216d90522decdffee1ee42e339f914fb10307719.tar.gz
error: Don't append a newline when printing the error hint
Since commit 50b7b00, we have error_append_hint() to conveniently accumulate Error member @hint. error_report_err() prints it with a newline appended. Consequently, users of error_append_hint() need to know whether theirs is the final line of the hint to decide whether it needs a newline. Not a nice interface. Change error_report_err() to print just the hint, and the (still few) users of error_append_hint() to add the required newline. Cc: Eric Blake <eblake@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <1450370121-5768-7-git-send-email-armbru@redhat.com>
Diffstat (limited to 'qdev-monitor.c')
-rw-r--r--qdev-monitor.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/qdev-monitor.c b/qdev-monitor.c
index a35098f..30936df 100644
--- a/qdev-monitor.c
+++ b/qdev-monitor.c
@@ -304,6 +304,7 @@ static void qbus_list_bus(DeviceState *dev, Error **errp)
error_append_hint(errp, "%s\"%s\"", sep, child->name);
sep = ", ";
}
+ error_append_hint(errp, "\n");
}
static void qbus_list_dev(BusState *bus, Error **errp)
@@ -321,6 +322,7 @@ static void qbus_list_dev(BusState *bus, Error **errp)
}
sep = ", ";
}
+ error_append_hint(errp, "\n");
}
static BusState *qbus_find_bus(DeviceState *dev, char *elem)
OpenPOWER on IntegriCloud