mirror of
https://github.com/qemu/qemu.git
synced 2024-11-23 19:03:38 +08:00
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>
This commit is contained in:
parent
b922c0506a
commit
e9e1d92d1d
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user