Fix ztest when it is executed by just 'ztest' and not by full path

'/usr/bin/ztest'.
This commit is contained in:
Pawel Jakub Dawidek 2010-11-01 10:42:14 +00:00
parent 1cc1967893
commit adea29ab75
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=214623

View File

@ -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/");