From patchwork Mon Jun 22 19:26:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 487363 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 1EDF3140077 for ; Tue, 23 Jun 2015 05:29:19 +1000 (AEST) Received: from localhost ([::1]:41765 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z77PB-0006my-OO for incoming@patchwork.ozlabs.org; Mon, 22 Jun 2015 15:29:17 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55532) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z77Mn-0002ND-0D for qemu-devel@nongnu.org; Mon, 22 Jun 2015 15:26:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z77Mj-0004yu-DV for qemu-devel@nongnu.org; Mon, 22 Jun 2015 15:26:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47337) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z77Mj-0004yj-8t for qemu-devel@nongnu.org; Mon, 22 Jun 2015 15:26:45 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id EE4532CD7E5 for ; Mon, 22 Jun 2015 19:26:44 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-65.ams2.redhat.com [10.36.116.65]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t5MJQhV9003032 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 22 Jun 2015 15:26:44 -0400 Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id DC8AA305B4D5; Mon, 22 Jun 2015 21:26:40 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Mon, 22 Jun 2015 21:26:38 +0200 Message-Id: <1435001200-20610-6-git-send-email-armbru@redhat.com> In-Reply-To: <1435001200-20610-1-git-send-email-armbru@redhat.com> References: <1435001200-20610-1-git-send-email-armbru@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: pbonzini@redhat.com, dgilbert@redhat.com, mst@redhat.com Subject: [Qemu-devel] [PATCH 5/7] error: error_set_errno() is unused, drop X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- include/qapi/error.h | 7 ++----- util/error.c | 5 ++--- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/include/qapi/error.h b/include/qapi/error.h index 692e013..8c3a7dd 100644 --- a/include/qapi/error.h +++ b/include/qapi/error.h @@ -35,8 +35,8 @@ void error_set(Error **errp, ErrorClass err_class, const char *fmt, ...) * printf-style human message, followed by a strerror() string if * @os_error is not zero. */ -void error_set_errno(Error **errp, int os_error, ErrorClass err_class, - const char *fmt, ...) GCC_FMT_ATTR(4, 5); +void error_setg_errno(Error **errp, int os_error, const char *fmt, ...) + GCC_FMT_ATTR(3, 4); #ifdef _WIN32 /** @@ -53,9 +53,6 @@ void error_setg_win32(Error **errp, int win32_err, const char *fmt, ...) */ void error_setg(Error **errp, const char *fmt, ...) GCC_FMT_ATTR(2, 3); -#define error_setg_errno(errp, os_error, fmt, ...) \ - error_set_errno(errp, os_error, ERROR_CLASS_GENERIC_ERROR, \ - fmt, ## __VA_ARGS__) /** * Helper for open() errors diff --git a/util/error.c b/util/error.c index 48eb53b..fb575ac 100644 --- a/util/error.c +++ b/util/error.c @@ -65,8 +65,7 @@ void error_setg(Error **errp, const char *fmt, ...) va_end(ap); } -void error_set_errno(Error **errp, int os_errno, ErrorClass err_class, - const char *fmt, ...) +void error_setg_errno(Error **errp, int os_errno, const char *fmt, ...) { va_list ap; char *msg; @@ -77,7 +76,7 @@ void error_set_errno(Error **errp, int os_errno, ErrorClass err_class, } va_start(ap, fmt); - error_setv(errp, err_class, fmt, ap); + error_setv(errp, ERROR_CLASS_GENERIC_ERROR, fmt, ap); va_end(ap); if (os_errno != 0) {