summaryrefslogtreecommitdiffstats
path: root/cddl
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2010-11-01 10:42:14 +0000
committerpjd <pjd@FreeBSD.org>2010-11-01 10:42:14 +0000
commit3f400ac84667dc8371351533cfe0941e3683f5af (patch)
treed6a068e21e874ba2593437f33df3d9581bfa478b /cddl
parent2133f19a2da5b78ecbd0a26057b3ebd1e1f1f794 (diff)
downloadFreeBSD-src-3f400ac84667dc8371351533cfe0941e3683f5af.zip
FreeBSD-src-3f400ac84667dc8371351533cfe0941e3683f5af.tar.gz
Fix ztest when it is executed by just 'ztest' and not by full path
'/usr/bin/ztest'.
Diffstat (limited to 'cddl')
-rw-r--r--cddl/contrib/opensolaris/cmd/ztest/ztest.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/cddl/contrib/opensolaris/cmd/ztest/ztest.c b/cddl/contrib/opensolaris/cmd/ztest/ztest.c
index 2e75bc8..3894f6b 100644
--- a/cddl/contrib/opensolaris/cmd/ztest/ztest.c
+++ b/cddl/contrib/opensolaris/cmd/ztest/ztest.c
@@ -3362,8 +3362,7 @@ ztest_verify_blocks(char *pool)
int isalen;
FILE *fp;
- if (realpath(progname, zdb) == NULL)
- assert(!"realpath() failed");
+ strlcpy(zdb, "/usr/bin/ztest", sizeof(zdb));
/* zdb lives in /usr/sbin, while ztest lives in /usr/bin */
bin = strstr(zdb, "/usr/bin/");
OpenPOWER on IntegriCloud