From f9fd1c01df0ccea1bd296fc7d43d5ff593789a8f Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Tue, 18 Jan 2005 07:42:17 +0000 Subject: [PATCH] ioctl(2) commands are u_long not int. Pass zero for sysctl new argument length, not NULL); --- tools/tools/crypto/cryptotest.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/tools/crypto/cryptotest.c b/tools/tools/crypto/cryptotest.c index fcfdbc1af25..2b9540bef15 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;