From patchwork Fri Aug 10 17:44:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 176590 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 7E92D2C0081 for ; Sat, 11 Aug 2012 04:42:12 +1000 (EST) Received: from localhost ([::1]:53574 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SztHy-0004HI-GF for incoming@patchwork.ozlabs.org; Fri, 10 Aug 2012 13:46:22 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41133) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SztGr-0002io-UM for qemu-devel@nongnu.org; Fri, 10 Aug 2012 13:45:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SztGo-0001sG-6X for qemu-devel@nongnu.org; Fri, 10 Aug 2012 13:45:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59032) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SztGn-0001s4-Sc for qemu-devel@nongnu.org; Fri, 10 Aug 2012 13:45:10 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q7AHj7Y5004491 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 10 Aug 2012 13:45:07 -0400 Received: from localhost (ovpn-113-102.phx2.redhat.com [10.3.113.102]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q7AHj4XL014345; Fri, 10 Aug 2012 13:45:07 -0400 From: Luiz Capitulino To: qemu-devel@nongnu.org Date: Fri, 10 Aug 2012 14:44:09 -0300 Message-Id: <1344620653-29067-32-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1344620653-29067-1-git-send-email-lcapitulino@redhat.com> References: <1344620653-29067-1-git-send-email-lcapitulino@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: kwolf@redhat.com, aliguori@us.ibm.com, armbru@redhat.com, mdroth@linux.vnet.ibm.com, pbonzini@redhat.com, eblake@redhat.com Subject: [Qemu-devel] [PATCH 31/35] error: drop error_get_qobject()/error_set_qobject() 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 error_get_qobject() is unused since last commit, error_set_qobject() has never been used. Also drops error_int.h. Signed-off-by: Luiz Capitulino --- error.c | 20 -------------------- error_int.h | 28 ---------------------------- qapi/qmp-dispatch.c | 1 - qemu-ga.c | 1 - 4 files changed, 50 deletions(-) delete mode 100644 error_int.h diff --git a/error.c b/error.c index b1d5131..9d7b35f 100644 --- a/error.c +++ b/error.c @@ -15,7 +15,6 @@ #include "qjson.h" #include "qdict.h" #include "qapi-types.h" -#include "error_int.h" #include "qerror.h" struct Error @@ -91,22 +90,3 @@ void error_propagate(Error **dst_err, Error *local_err) error_free(local_err); } } - -QObject *error_get_qobject(Error *err) -{ - QINCREF(err->obj); - return QOBJECT(err->obj); -} - -void error_set_qobject(Error **errp, QObject *obj) -{ - Error *err; - if (errp == NULL) { - return; - } - err = g_malloc0(sizeof(*err)); - err->obj = qobject_to_qdict(obj); - qobject_incref(obj); - - *errp = err; -} diff --git a/error_int.h b/error_int.h deleted file mode 100644 index 4b00d08..0000000 --- a/error_int.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * QEMU Error Objects - * - * Copyright IBM, Corp. 2011 - * - * Authors: - * Anthony Liguori - * - * This work is licensed under the terms of the GNU LGPL, version 2. See - * the COPYING.LIB file in the top-level directory. - */ -#ifndef QEMU_ERROR_INT_H -#define QEMU_ERROR_INT_H - -#include "qemu-common.h" -#include "qobject.h" -#include "qdict.h" -#include "error.h" - -/** - * Internal QEMU functions for working with Error. - * - * These are used to convert QErrors to Errors - */ -QObject *error_get_qobject(Error *err); -void error_set_qobject(Error **errp, QObject *obj); - -#endif diff --git a/qapi/qmp-dispatch.c b/qapi/qmp-dispatch.c index ec613f8..4085994 100644 --- a/qapi/qmp-dispatch.c +++ b/qapi/qmp-dispatch.c @@ -16,7 +16,6 @@ #include "json-parser.h" #include "qapi-types.h" #include "error.h" -#include "error_int.h" #include "qerror.h" static QDict *qmp_dispatch_check_obj(const QObject *request, Error **errp) diff --git a/qemu-ga.c b/qemu-ga.c index 39abc50..8f87621 100644 --- a/qemu-ga.c +++ b/qemu-ga.c @@ -28,7 +28,6 @@ #include "module.h" #include "signal.h" #include "qerror.h" -#include "error_int.h" #include "qapi/qmp-core.h" #include "qga/channel.h" #ifdef _WIN32