mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 14:53:54 -06:00
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>
This commit is contained in:
parent
9280eb34de
commit
543202c0dd
3 changed files with 5 additions and 3 deletions
|
@ -204,7 +204,7 @@ void error_report_err(Error *err)
|
|||
{
|
||||
error_report("%s", error_get_pretty(err));
|
||||
if (err->hint) {
|
||||
error_printf_unless_qmp("%s\n", err->hint->str);
|
||||
error_printf_unless_qmp("%s", err->hint->str);
|
||||
}
|
||||
error_free(err);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue