From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=38789 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OGaJF-0006xC-Ju for qemu-devel@nongnu.org; Mon, 24 May 2010 12:15:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OGaJA-0008KT-VC for qemu-devel@nongnu.org; Mon, 24 May 2010 12:15:21 -0400 Received: from e23smtp01.au.ibm.com ([202.81.31.143]:44292) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OGaJA-0008KK-Au for qemu-devel@nongnu.org; Mon, 24 May 2010 12:15:16 -0400 Received: from d23relay03.au.ibm.com (d23relay03.au.ibm.com [202.81.31.245]) by e23smtp01.au.ibm.com (8.14.3/8.13.1) with ESMTP id o4OGCl2f015515 for ; Tue, 25 May 2010 02:12:47 +1000 Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o4OGFD791572992 for ; Tue, 25 May 2010 02:15:13 +1000 Received: from d23av03.au.ibm.com (loopback [127.0.0.1]) by d23av03.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id o4OGFCk6003287 for ; Tue, 25 May 2010 02:15:12 +1000 Message-ID: <4BFAA60D.6080308@linux.vnet.ibm.com> Date: Mon, 24 May 2010 21:45:09 +0530 From: Prerna Saxena MIME-Version: 1.0 References: <4BFAA3BB.5030207@linux.vnet.ibm.com> In-Reply-To: <4BFAA3BB.5030207@linux.vnet.ibm.com> Content-Type: multipart/mixed; boundary="------------060103060509060905080701" Subject: [Qemu-devel] [PATCH 1/3]make tdb_hash available List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Maneesh Soni , Anthony Liguori , Ananth , Stefan Hajnoczi This is a multi-part message in MIME format. --------------060103060509060905080701 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit This function is used for hash table lookups by tracepoint framework. The patch adds trivial changes to reuse it. Regards, -- Prerna Saxena Linux Technology Centre, IBM Systems and Technology Lab, Bangalore, India --------------060103060509060905080701 Content-Type: text/x-diff; name="qhash.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="qhash.patch" Signed-off by : Prerna (prerna@linux.vnet.ibm.com) Index: qemu/qdict.c =================================================================== --- qemu.orig/qdict.c +++ qemu/qdict.c @@ -56,7 +56,7 @@ QDict *qobject_to_qdict(const QObject *o * 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. */ Index: qemu/qdict.h =================================================================== --- qemu.orig/qdict.h +++ qemu/qdict.h @@ -46,5 +46,7 @@ const char *qdict_get_str(const QDict *q 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 */ --------------060103060509060905080701--