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

View File

@ -3362,8 +3362,7 @@ ztest_verify_blocks(char *pool)
int isalen; int isalen;
FILE *fp; FILE *fp;
if (realpath(progname, zdb) == NULL) strlcpy(zdb, "/usr/bin/ztest", sizeof(zdb));
assert(!"realpath() failed");
/* zdb lives in /usr/sbin, while ztest lives in /usr/bin */ /* zdb lives in /usr/sbin, while ztest lives in /usr/bin */
bin = strstr(zdb, "/usr/bin/"); bin = strstr(zdb, "/usr/bin/");