diff --git a/usr.bin/nbperf/nbperf-bdz.c b/usr.bin/nbperf/nbperf-bdz.c index 927ccd45d278..3c8e35357e7d 100644 --- a/usr.bin/nbperf/nbperf-bdz.c +++ b/usr.bin/nbperf/nbperf-bdz.c @@ -1,4 +1,4 @@ -/* $NetBSD: nbperf-bdz.c,v 1.6 2012/11/23 02:57:57 joerg Exp $ */ +/* $NetBSD: nbperf-bdz.c,v 1.7 2013/01/31 16:32:02 joerg Exp $ */ /*- * Copyright (c) 2009, 2012 The NetBSD Foundation, Inc. * All rights reserved. @@ -36,7 +36,7 @@ #endif #include -__RCSID("$NetBSD: nbperf-bdz.c,v 1.6 2012/11/23 02:57:57 joerg Exp $"); +__RCSID("$NetBSD: nbperf-bdz.c,v 1.7 2013/01/31 16:32:02 joerg Exp $"); #include #include @@ -253,7 +253,7 @@ print_hash(struct nbperf *nbperf, struct state *state) } int -bdz_compute(struct nbperf *nbperf) +bpz_compute(struct nbperf *nbperf) { struct state state; int retval = -1; diff --git a/usr.bin/nbperf/nbperf.1 b/usr.bin/nbperf/nbperf.1 index 5da77d11b24c..ebc24041ab24 100644 --- a/usr.bin/nbperf/nbperf.1 +++ b/usr.bin/nbperf/nbperf.1 @@ -1,4 +1,4 @@ -.\" $NetBSD: nbperf.1,v 1.5 2012/09/25 20:53:46 joerg Exp $ +.\" $NetBSD: nbperf.1,v 1.6 2013/01/31 16:32:02 joerg Exp $ .\" .\" Copyright (c) 2009 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -88,7 +88,7 @@ This makes the output for .Ar chm3 noticable smaller than the output for .Ar chm . -.It Sy bdz +.It Sy bpz This results in a non-order preserving minimal perfect hash function. Output size is approximately 2.79 bit per key for the default value of .Ar utilisation , diff --git a/usr.bin/nbperf/nbperf.c b/usr.bin/nbperf/nbperf.c index dcb096203cd0..a35a325501dd 100644 --- a/usr.bin/nbperf/nbperf.c +++ b/usr.bin/nbperf/nbperf.c @@ -1,4 +1,4 @@ -/* $NetBSD: nbperf.c,v 1.4 2011/10/21 23:47:11 joerg Exp $ */ +/* $NetBSD: nbperf.c,v 1.5 2013/01/31 16:32:02 joerg Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. * All rights reserved. @@ -36,7 +36,7 @@ #endif #include -__RCSID("$NetBSD: nbperf.c,v 1.4 2011/10/21 23:47:11 joerg Exp $"); +__RCSID("$NetBSD: nbperf.c,v 1.5 2013/01/31 16:32:02 joerg Exp $"); #include #include @@ -135,12 +135,14 @@ main(int argc, char **argv) while ((ch = getopt(argc, argv, "a:c:h:i:m:n:o:ps")) != -1) { switch (ch) { case 'a': + /* Accept bdz as alias for netbsd-6 compat. */ if (strcmp(optarg, "chm") == 0) build_hash = chm_compute; else if (strcmp(optarg, "chm3") == 0) build_hash = chm3_compute; - else if (strcmp(optarg, "bdz") == 0) - build_hash = bdz_compute; + else if (strcmp(optarg, "bpz") == 0 || + strcmp(optarg, "bdz") == 0) + build_hash = bpz_compute; else errx(1, "Unsupport algorithm: %s", optarg); break; diff --git a/usr.bin/nbperf/nbperf.h b/usr.bin/nbperf/nbperf.h index 3922874856db..413b8c3ce914 100644 --- a/usr.bin/nbperf/nbperf.h +++ b/usr.bin/nbperf/nbperf.h @@ -1,4 +1,4 @@ -/* $NetBSD: nbperf.h,v 1.3 2010/03/03 01:55:04 joerg Exp $ */ +/* $NetBSD: nbperf.h,v 1.4 2013/01/31 16:32:02 joerg Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. * All rights reserved. @@ -56,4 +56,4 @@ struct nbperf { int chm_compute(struct nbperf *); int chm3_compute(struct nbperf *); -int bdz_compute(struct nbperf *); +int bpz_compute(struct nbperf *);