From patchwork Fri Jul 27 21:31:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 173796 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 C812F2C0092 for ; Sat, 28 Jul 2012 07:48:42 +1000 (EST) Received: from localhost ([::1]:46417 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SusOm-0005WK-W8 for incoming@patchwork.ozlabs.org; Fri, 27 Jul 2012 17:48:41 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58731) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SusOg-0005W8-Ut for qemu-devel@nongnu.org; Fri, 27 Jul 2012 17:48:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SusOf-000540-V7 for qemu-devel@nongnu.org; Fri, 27 Jul 2012 17:48:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60649) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SusOf-00053w-MX for qemu-devel@nongnu.org; Fri, 27 Jul 2012 17:48:33 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q6RLVtNB019745 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 27 Jul 2012 17:31:55 -0400 Received: from localhost (ovpn-113-90.phx2.redhat.com [10.3.113.90]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q6RLVsZa007391; Fri, 27 Jul 2012 17:31:55 -0400 From: Luiz Capitulino To: qemu-devel@nongnu.org Date: Fri, 27 Jul 2012 18:31:55 -0300 Message-Id: <1343424728-22461-15-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1343424728-22461-1-git-send-email-lcapitulino@redhat.com> References: <1343424728-22461-1-git-send-email-lcapitulino@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 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, pbonzini@redhat.com, aliguori@us.ibm.com, eblake@redhat.com, armbru@redhat.com Subject: [Qemu-devel] [PATCH 14/27] error: drop functions used to get error data 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 They are not used anymore and all current errors' data are going to be dropped. Signed-off-by: Luiz Capitulino --- error.c | 23 ----------------------- error.h | 10 ---------- error_int.h | 1 - 3 files changed, 34 deletions(-) diff --git a/error.c b/error.c index cdeeafe..b9d9b64 100644 --- a/error.c +++ b/error.c @@ -64,29 +64,6 @@ const char *error_get_pretty(Error *err) return err->msg; } -const char *error_get_field(Error *err, const char *field) -{ - if (strcmp(field, "class") == 0) { - return qdict_get_str(err->obj, field); - } else { - QDict *dict = qdict_get_qdict(err->obj, "data"); - return qdict_get_str(dict, field); - } -} - -QDict *error_get_data(Error *err) -{ - QDict *data = qdict_get_qdict(err->obj, "data"); - QINCREF(data); - return data; -} - -void error_set_field(Error *err, const char *field, const char *value) -{ - QDict *dict = qdict_get_qdict(err->obj, "data"); - qdict_put(dict, field, qstring_from_str(value)); -} - void error_free(Error *err) { if (err) { diff --git a/error.h b/error.h index 45ff6c1..592a734 100644 --- a/error.h +++ b/error.h @@ -45,16 +45,6 @@ Error *error_copy(const Error *err); const char *error_get_pretty(Error *err); /** - * Get an individual named error field. - */ -const char *error_get_field(Error *err, const char *field); - -/** - * Get an individual named error field. - */ -void error_set_field(Error *err, const char *field, const char *value); - -/** * Propagate an error to an indirect pointer to an error. This function will * always transfer ownership of the error reference and handles the case where * dst_err is NULL correctly. diff --git a/error_int.h b/error_int.h index 5e39424..4b00d08 100644 --- a/error_int.h +++ b/error_int.h @@ -22,7 +22,6 @@ * * These are used to convert QErrors to Errors */ -QDict *error_get_data(Error *err); QObject *error_get_qobject(Error *err); void error_set_qobject(Error **errp, QObject *obj);