summaryrefslogtreecommitdiff
path: root/lib/tdb/common
diff options
context:
space:
mode:
authorChristian Ambach <ambi@samba.org>2013-05-11 00:45:15 +0200
committerChristian Ambach <ambi@samba.org>2013-05-14 14:34:20 +0200
commit11f467d0bd8e2264f311d82f3299443b99526bb3 (patch)
tree638f0f42fa90beb7ff221c07517c7fcc71b0d2c2 /lib/tdb/common
parent7d8a1b1e0496a15872feedff06da8d762ded4246 (diff)
downloadsamba-11f467d0bd8e2264f311d82f3299443b99526bb3.tar.gz
samba-11f467d0bd8e2264f311d82f3299443b99526bb3.tar.bz2
samba-11f467d0bd8e2264f311d82f3299443b99526bb3.zip
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 <ambi@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
Diffstat (limited to 'lib/tdb/common')
-rw-r--r--lib/tdb/common/summary.c2
1 files changed, 2 insertions, 0 deletions
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,