Author: pjd
Date: Mon Nov  1 10:42:14 2010
New Revision: 214623
URL: http://svn.freebsd.org/changeset/base/214623

Log:
  Fix ztest when it is executed by just 'ztest' and not by full path
  '/usr/bin/ztest'.

Modified:
  head/cddl/contrib/opensolaris/cmd/ztest/ztest.c

Modified: head/cddl/contrib/opensolaris/cmd/ztest/ztest.c
==============================================================================
--- head/cddl/contrib/opensolaris/cmd/ztest/ztest.c     Mon Nov  1 10:41:05 
2010        (r214622)
+++ head/cddl/contrib/opensolaris/cmd/ztest/ztest.c     Mon Nov  1 10:42:14 
2010        (r214623)
@@ -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/");
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to