Fix ztest when it is executed by just 'ztest' and not by full path
'/usr/bin/ztest'.
This commit is contained in:
parent
1cc1967893
commit
adea29ab75
@ -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/");
|
||||||
|
Loading…
Reference in New Issue
Block a user