From patchwork Mon May 24 16:15:09 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [1/3] make tdb_hash available Date: Mon, 24 May 2010 06:15:09 -0000 From: Prerna Saxena X-Patchwork-Id: 53435 Message-Id: <4BFAA60D.6080308@linux.vnet.ibm.com> To: qemu-devel@nongnu.org Cc: Maneesh Soni , Anthony Liguori , Ananth , Stefan Hajnoczi This function is used for hash table lookups by tracepoint framework. The patch adds trivial changes to reuse it. Regards, 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 */