From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:54773) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hHE0e-0005Ds-AL for qemu-devel@nongnu.org; Thu, 18 Apr 2019 16:51:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hHE0Z-0005Jm-1J for qemu-devel@nongnu.org; Thu, 18 Apr 2019 16:51:49 -0400 From: Markus Armbruster Date: Thu, 18 Apr 2019 22:51:04 +0200 Message-Id: <20190418205135.6686-6-armbru@redhat.com> In-Reply-To: <20190418205135.6686-1-armbru@redhat.com> References: <20190418205135.6686-1-armbru@redhat.com> Subject: [Qemu-devel] [PULL for-4.1 05/36] qemu-img: Use error_vreport() in error_exit() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Max Reitz , qemu-block@nongnu.org error_exit() uses low-level error_printf() to report errors. Modernize it to use error_vreport(). Cc: Kevin Wolf Cc: Max Reitz Cc: qemu-block@nongnu.org Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <20190417190641.26814-2-armbru@redhat.com> --- qemu-img.c | 6 ++---- 1 file 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); } -- 2.17.2 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7BFB9C10F0E for ; Thu, 18 Apr 2019 21:15:11 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4A99F214C6 for ; Thu, 18 Apr 2019 21:15:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4A99F214C6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([127.0.0.1]:47434 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hHENC-0006qB-Fh for qemu-devel@archiver.kernel.org; Thu, 18 Apr 2019 17:15:10 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54773) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hHE0e-0005Ds-AL for qemu-devel@nongnu.org; Thu, 18 Apr 2019 16:51:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hHE0Z-0005Jm-1J for qemu-devel@nongnu.org; Thu, 18 Apr 2019 16:51:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45224) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hHE0R-0005AQ-TS; Thu, 18 Apr 2019 16:51:40 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 30EAE89C39; Thu, 18 Apr 2019 20:51:39 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-116.ams2.redhat.com [10.36.116.116]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 002A460852; Thu, 18 Apr 2019 20:51:38 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 23D2A1132B38; Thu, 18 Apr 2019 22:51:36 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Thu, 18 Apr 2019 22:51:04 +0200 Message-Id: <20190418205135.6686-6-armbru@redhat.com> In-Reply-To: <20190418205135.6686-1-armbru@redhat.com> References: <20190418205135.6686-1-armbru@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 18 Apr 2019 20:51:39 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL for-4.1 05/36] qemu-img: Use error_vreport() in error_exit() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-block@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="UTF-8" Message-ID: <20190418205104.s71rMxu1eKpL5UIjpfLMM31dFw1ze0ctrTdicu34FK4@z> error_exit() uses low-level error_printf() to report errors. Modernize it to use error_vreport(). Cc: Kevin Wolf Cc: Max Reitz Cc: qemu-block@nongnu.org Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <20190417190641.26814-2-armbru@redhat.com> --- qemu-img.c | 6 ++---- 1 file 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); } -- 2.17.2