From owner-svn-src-all@FreeBSD.ORG Mon Nov 1 10:42:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE2421065674; Mon, 1 Nov 2010 10:42:14 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BC5AE8FC1D; Mon, 1 Nov 2010 10:42:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oA1AgE0H058140; Mon, 1 Nov 2010 10:42:14 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oA1AgEot058138; Mon, 1 Nov 2010 10:42:14 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201011011042.oA1AgEot058138@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 1 Nov 2010 10:42:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214623 - head/cddl/contrib/opensolaris/cmd/ztest X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Nov 2010 10:42:14 -0000 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/");