aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2019-04-17 21:06:27 +0200
committerMarkus Armbruster <armbru@redhat.com>2019-04-17 21:21:49 +0200
commite9e1d92d1d8f0bce81a1f25cfeeda9c7374b6ab5 (patch)
treeafb006ed43af14f7d825155b0dfa93940e34af99
parentb922c0506ad557b98ded1a0c7259844738a86e78 (diff)
qemu-img: Use error_vreport() in error_exit()
error_exit() uses low-level error_printf() to report errors. Modernize it to use error_vreport(). Cc: Kevin Wolf <kwolf@redhat.com> Cc: Max Reitz <mreitz@redhat.com> Cc: qemu-block@nongnu.org Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20190417190641.26814-2-armbru@redhat.com>
-rw-r--r--qemu-img.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/qemu-img.c b/qemu-img.c
index 8c7b2437f0..c376e91ca0 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -85,13 +85,11 @@ static void QEMU_NORETURN GCC_FMT_ATTR(1, 2) error_exit(const char *fmt, ...)
{
va_list ap;
- error_printf("qemu-img: ");
-
va_start(ap, fmt);
- error_vprintf(fmt, ap);
+ error_vreport(fmt, ap);
va_end(ap);
- error_printf("\nTry 'qemu-img --help' for more information\n");
+ error_printf("Try 'qemu-img --help' for more information\n");
exit(EXIT_FAILURE);
}