From patchwork Thu Jun 10 19:15:58 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prerna Saxena X-Patchwork-Id: 105447 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o5AJGCBu019847 for ; Thu, 10 Jun 2010 19:16:13 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759178Ab0FJTQJ (ORCPT ); Thu, 10 Jun 2010 15:16:09 -0400 Received: from e28smtp01.in.ibm.com ([122.248.162.1]:57626 "EHLO e28smtp01.in.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752891Ab0FJTQI (ORCPT ); Thu, 10 Jun 2010 15:16:08 -0400 Received: from d28relay05.in.ibm.com (d28relay05.in.ibm.com [9.184.220.62]) by e28smtp01.in.ibm.com (8.14.4/8.13.1) with ESMTP id o5AJG4M8014274 for ; Fri, 11 Jun 2010 00:46:04 +0530 Received: from d28av05.in.ibm.com (d28av05.in.ibm.com [9.184.220.67]) by d28relay05.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o5AJG4sB3510424 for ; Fri, 11 Jun 2010 00:46:04 +0530 Received: from d28av05.in.ibm.com (loopback [127.0.0.1]) by d28av05.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o5AJG3Rs031084 for ; Fri, 11 Jun 2010 05:16:04 +1000 Received: from zephyr ([9.77.123.112]) by d28av05.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id o5AJG2k6031068; Fri, 11 Jun 2010 05:16:02 +1000 Date: Fri, 11 Jun 2010 00:45:58 +0530 From: Prerna Saxena To: qemu-devel@nongnu.org Cc: Anthony Liguori , Stefan Hajnoczi , kvm@vger.kernel.org, Jan Kiszka , Luiz Capitulino , maneesh@linux.vnet.ibm.com, ananth@linux.vnet.ibm.com Subject: [RFC v2] [PATCH 1/3] Export tdb_hash() Message-ID: <20100611004558.7d87f0e5@zephyr> In-Reply-To: <20100611003811.2635fa5d@zephyr> References: <20100611003811.2635fa5d@zephyr> Organization: IBM X-Mailer: Claws Mail 3.7.5 (GTK+ 2.16.6; i586-redhat-linux-gnu) Mime-Version: 1.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 10 Jun 2010 19:16:13 +0000 (UTC) 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 */