diff options
author | phk <phk@FreeBSD.org> | 2005-01-18 07:42:17 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2005-01-18 07:42:17 +0000 |
commit | b99c38ceb36e741cafd887836baa509613e44039 (patch) | |
tree | 435506e5fb8700685146830b84b95159c27d944d | |
parent | 220b6a24144d509f576a8302fa32050982be9f40 (diff) | |
download | FreeBSD-src-b99c38ceb36e741cafd887836baa509613e44039.zip FreeBSD-src-b99c38ceb36e741cafd887836baa509613e44039.tar.gz |
ioctl(2) commands are u_long not int.
Pass zero for sysctl new argument length, not NULL);
-rw-r--r-- | tools/tools/crypto/cryptotest.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/tools/crypto/cryptotest.c b/tools/tools/crypto/cryptotest.c index fcfdbc1..2b9540b 100644 --- a/tools/tools/crypto/cryptotest.c +++ b/tools/tools/crypto/cryptotest.c @@ -215,7 +215,7 @@ rdigit(void) } static void -runtest(struct alg *alg, int count, int size, int cmd, struct timeval *tv) +runtest(struct alg *alg, int count, int size, u_long cmd, struct timeval *tv) { int i, fd = crget(); struct timeval start, stop, dt; @@ -363,7 +363,7 @@ resetstats() size_t slen; slen = sizeof (stats); - if (sysctlbyname("kern.crypto_stats", &stats, &slen, NULL, NULL) < 0) { + if (sysctlbyname("kern.crypto_stats", &stats, &slen, NULL, 0) < 0) { perror("kern.crypto_stats"); return; } @@ -395,7 +395,7 @@ printt(const char* tag, struct cryptotstat *ts) #endif static void -runtests(struct alg *alg, int count, int size, int cmd, int threads, int profile) +runtests(struct alg *alg, int count, int size, u_long cmd, int threads, int profile) { int i, status; double t; @@ -461,7 +461,7 @@ runtests(struct alg *alg, int count, int size, int cmd, int threads, int profile if (sysctlbyname("debug.crypto_timing", NULL, NULL, &otiming, sizeof (otiming)) < 0) perror("debug.crypto_timing"); - if (sysctlbyname("kern.crypto_stats", &stats, &slen, NULL, NULL) < 0) + if (sysctlbyname("kern.crypto_stats", &stats, &slen, NULL, 0) < 0) perror("kern.cryptostats"); if (stats.cs_invoke.count) { printt("dispatch->invoke", &stats.cs_invoke); @@ -480,7 +480,7 @@ main(int argc, char **argv) struct alg *alg = NULL; int count = 1; int sizes[128], nsizes = 0; - int cmd = CIOCGSESSION; + u_long cmd = CIOCGSESSION; int testall = 0; int maxthreads = 1; int profile = 0; |