From 11f467d0bd8e2264f311d82f3299443b99526bb3 Mon Sep 17 00:00:00 2001 From: Christian Ambach Date: Sat, 11 May 2013 00:45:15 +0200 Subject: tdb: include information about hash function being used in tdbtool info output makes it possible to easily determine if the tdb under examination uses jenkins hash or not Signed-off-by: Christian Ambach Reviewed-by: Volker Lendecke --- lib/tdb/common/summary.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/tdb') diff --git a/lib/tdb/common/summary.c b/lib/tdb/common/summary.c index f4e6d2c7b4..ef2c49a2da 100644 --- a/lib/tdb/common/summary.c +++ b/lib/tdb/common/summary.c @@ -20,6 +20,7 @@ #define SUMMARY_FORMAT \ "Size of file/data: %u/%zu\n" \ "Number of records: %zu\n" \ + "Incompatible hash: %s\n" \ "Smallest/average/largest keys: %zu/%zu/%zu\n" \ "Smallest/average/largest data: %zu/%zu/%zu\n" \ "Smallest/average/largest padding: %zu/%zu/%zu\n" \ @@ -171,6 +172,7 @@ _PUBLIC_ char *tdb_summary(struct tdb_context *tdb) snprintf(ret, len, SUMMARY_FORMAT, tdb->map_size, keys.total+data.total, keys.num, + (tdb->hash_fn == tdb_jenkins_hash)?"yes":"no", keys.min, tally_mean(&keys), keys.max, data.min, tally_mean(&data), data.max, extra.min, tally_mean(&extra), extra.max, -- cgit