aboutsummaryrefslogtreecommitdiff
path: root/util/qemu-option.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2015-12-17 17:35:14 +0100
committerMarkus Armbruster <armbru@redhat.com>2016-01-13 11:58:58 +0100
commit543202c0ddbcc4ee97d82fe45356e1ab00093f90 (patch)
tree44ca326a29cb61e8ae121ab390eb80e65aa50445 /util/qemu-option.c
parent9280eb34deb032d7c86275a92651ae63cc5418d5 (diff)
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 'util/qemu-option.c')
-rw-r--r--util/qemu-option.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/qemu-option.c b/util/qemu-option.c
index a50eceae4a..a2d593ad2b 100644
--- a/util/qemu-option.c
+++ b/util/qemu-option.c
@@ -206,7 +206,7 @@ void parse_option_size(const char *name, const char *value,
default:
error_setg(errp, QERR_INVALID_PARAMETER_VALUE, name, "a size");
error_append_hint(errp, "You may use k, M, G or T suffixes for "
- "kilobytes, megabytes, gigabytes and terabytes.");
+ "kilobytes, megabytes, gigabytes and terabytes.\n");
return;
}
} else {
@@ -647,7 +647,7 @@ QemuOpts *qemu_opts_create(QemuOptsList *list, const char *id,
error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "id",
"an identifier");
error_append_hint(errp, "Identifiers consist of letters, digits, "
- "'-', '.', '_', starting with a letter.");
+ "'-', '.', '_', starting with a letter.\n");
return NULL;
}
opts = qemu_opts_find(list, id);