From patchwork Tue Jun 8 07:01:38 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prerna Saxena X-Patchwork-Id: 54938 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 793A6B7D66 for ; Tue, 8 Jun 2010 17:03:01 +1000 (EST) Received: from localhost ([127.0.0.1]:35483 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OLspu-0001vK-Ub for incoming@patchwork.ozlabs.org; Tue, 08 Jun 2010 03:02:58 -0400 Received: from [140.186.70.92] (port=33060 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OLsol-0001v3-28 for qemu-devel@nongnu.org; Tue, 08 Jun 2010 03:01:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OLsoj-00051l-MQ for qemu-devel@nongnu.org; Tue, 08 Jun 2010 03:01:46 -0400 Received: from e28smtp05.in.ibm.com ([122.248.162.5]:55678) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OLsoi-00051B-JR for qemu-devel@nongnu.org; Tue, 08 Jun 2010 03:01:45 -0400 Received: from d28relay01.in.ibm.com (d28relay01.in.ibm.com [9.184.220.58]) by e28smtp05.in.ibm.com (8.14.4/8.13.1) with ESMTP id o5871faI002952 for ; Tue, 8 Jun 2010 12:31:41 +0530 Received: from d28av03.in.ibm.com (d28av03.in.ibm.com [9.184.220.65]) by d28relay01.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o5871eDn851990 for ; Tue, 8 Jun 2010 12:31:40 +0530 Received: from d28av03.in.ibm.com (loopback [127.0.0.1]) by d28av03.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o5871eQM015922 for ; Tue, 8 Jun 2010 17:01:40 +1000 Received: from zephyr ([9.124.35.20]) by d28av03.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id o5871eSw015919; Tue, 8 Jun 2010 17:01:40 +1000 Date: Tue, 8 Jun 2010 12:31:38 +0530 From: Prerna Saxena To: qemu-devel@nongnu.org Message-ID: <20100608123138.353f46f3@zephyr> In-Reply-To: <20100608122803.6a684a5e@zephyr> References: <20100608122803.6a684a5e@zephyr> Organization: IBM X-Mailer: Claws Mail 3.7.5 (GTK+ 2.16.6; i586-redhat-linux-gnu) Mime-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Cc: Anthony Liguori , Stefan Hajnoczi , kvm@vger.kernel.org, Kiszka , maneesh@linux.vnet.ibm.com, ananth@linux.vnet.ibm.com, Jan@us.ibm.com Subject: [Qemu-devel] [PATCH 1/3] export tdb_hash() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This exports tdb_hash() for use by tracing framework. Signed-off-by: Prerna Saxena --- qdict.c | 2 +- qdict.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/qdict.c b/qdict.c index 175bc17..5261872 100644 --- a/qdict.c +++ b/qdict.c @@ -56,7 +56,7 @@ QDict *qobject_to_qdict(const QObject *obj) * tdb_hash(): based on the hash agorithm from gdbm, via tdb * (from module-init-tools) */ -static unsigned int tdb_hash(const char *name) +unsigned int tdb_hash(const char *name) { unsigned value; /* Used to compute the hash value. */ unsigned i; /* Used to cycle through random values. */ diff --git a/qdict.h b/qdict.h index 5e5902c..d221c18 100644 --- a/qdict.h +++ b/qdict.h @@ -59,4 +59,6 @@ int64_t qdict_get_try_int(const QDict *qdict, const char *key, int64_t err_value); const char *qdict_get_try_str(const QDict *qdict, const char *key); +/* Export tdb_hash() for use by trace framework */ +unsigned int tdb_hash(const char *name); #endif /* QDICT_H */