From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=59727 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OMRzk-0002Q4-6Z for qemu-devel@nongnu.org; Wed, 09 Jun 2010 16:35:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OMRzi-00078P-A3 for qemu-devel@nongnu.org; Wed, 09 Jun 2010 16:35:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:63249) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OMRzi-000786-0S for qemu-devel@nongnu.org; Wed, 09 Jun 2010 16:35:26 -0400 Date: Wed, 9 Jun 2010 17:35:06 -0300 From: Luiz Capitulino Subject: Re: [Qemu-devel] [PATCH 1/3] export tdb_hash() Message-ID: <20100609173506.454225c7@redhat.com> In-Reply-To: <20100608123138.353f46f3@zephyr> References: <20100608122803.6a684a5e@zephyr> <20100608123138.353f46f3@zephyr> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Prerna Saxena Cc: Anthony Liguori , Hajnoczi , kvm@vger.kernel.org, Kiszka , Stefan@gnu.org, qemu-devel@nongnu.org, maneesh@linux.vnet.ibm.com, ananth@linux.vnet.ibm.com, Jan@us.ibm.com On Tue, 8 Jun 2010 12:31:38 +0530 Prerna Saxena wrote: > This exports tdb_hash() for use by tracing framework. Suggest to rename it (eg. qemu_hash()) and move it to a better location, qdict is not the best module to export such service. > > 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 */