From patchwork Fri Oct 18 01:11:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Xia X-Patchwork-Id: 284469 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)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 59BF52C00C8 for ; Fri, 18 Oct 2013 20:15:53 +1100 (EST) Received: from localhost ([::1]:56497 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VX69v-0005Wx-5D for incoming@patchwork.ozlabs.org; Fri, 18 Oct 2013 05:15:51 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57874) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VX664-0000WF-3L for qemu-devel@nongnu.org; Fri, 18 Oct 2013 05:12:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VX65u-0007E2-JX for qemu-devel@nongnu.org; Fri, 18 Oct 2013 05:11:52 -0400 Received: from e28smtp04.in.ibm.com ([122.248.162.4]:37093) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VX65t-0007Dj-Ta for qemu-devel@nongnu.org; Fri, 18 Oct 2013 05:11:42 -0400 Received: from /spool/local by e28smtp04.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 18 Oct 2013 14:41:40 +0530 Received: from d28dlp03.in.ibm.com (9.184.220.128) by e28smtp04.in.ibm.com (192.168.1.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 18 Oct 2013 14:41:39 +0530 Received: from d28relay04.in.ibm.com (d28relay04.in.ibm.com [9.184.220.61]) by d28dlp03.in.ibm.com (Postfix) with ESMTP id 34F6D1258056 for ; Fri, 18 Oct 2013 14:42:08 +0530 (IST) Received: from d28av02.in.ibm.com (d28av02.in.ibm.com [9.184.220.64]) by d28relay04.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r9I9BVJ237814362 for ; Fri, 18 Oct 2013 14:41:31 +0530 Received: from d28av02.in.ibm.com (localhost [127.0.0.1]) by d28av02.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id r9I9BXxw009146 for ; Fri, 18 Oct 2013 14:41:34 +0530 Received: from RH64wenchao ([9.181.129.59]) by d28av02.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id r9I9BOpF008595; Fri, 18 Oct 2013 14:41:32 +0530 From: Wenchao Xia To: qemu-devel@nongnu.org Date: Fri, 18 Oct 2013 09:11:13 +0800 Message-Id: <1382058681-14957-6-git-send-email-xiawenc@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1382058681-14957-1-git-send-email-xiawenc@linux.vnet.ibm.com> References: <1382058681-14957-1-git-send-email-xiawenc@linux.vnet.ibm.com> X-TM-AS-MML: No X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13101809-5564-0000-0000-00000A3A1661 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 122.248.162.4 Cc: kwolf@redhat.com, stefanha@gmail.com, lcapitulino@redhat.com, pbonzini@redhat.com, Wenchao Xia Subject: [Qemu-devel] [PATCH 05/13] error: define struct Error in only one place 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: Wenchao Xia --- include/qapi/error.h | 5 ++++- qobject/qerror.c | 7 ------- util/error.c | 6 ------ 3 files changed, 4 insertions(+), 14 deletions(-) diff --git a/include/qapi/error.h b/include/qapi/error.h index 7d4c696..8688aaf 100644 --- a/include/qapi/error.h +++ b/include/qapi/error.h @@ -20,7 +20,10 @@ * A class representing internal errors within QEMU. An error has a ErrorClass * code and a human message. */ -typedef struct Error Error; +typedef struct Error { + char *msg; + ErrorClass err_class; +} Error; /** * Set an indirect pointer to an error given a ErrorClass value and a diff --git a/qobject/qerror.c b/qobject/qerror.c index 3aee1cf..5b487f3 100644 --- a/qobject/qerror.c +++ b/qobject/qerror.c @@ -97,13 +97,6 @@ void qerror_report(ErrorClass eclass, const char *fmt, ...) } } -/* Evil... */ -struct Error -{ - char *msg; - ErrorClass err_class; -}; - void qerror_report_err(Error *err) { QError *qerr; diff --git a/util/error.c b/util/error.c index ec0faa6..da0d221 100644 --- a/util/error.c +++ b/util/error.c @@ -17,12 +17,6 @@ #include "qapi-types.h" #include "qapi/qmp/qerror.h" -struct Error -{ - char *msg; - ErrorClass err_class; -}; - void error_set(Error **errp, ErrorClass err_class, const char *fmt, ...) { Error *err;