From owner-svn-src-head@freebsd.org Wed Dec 23 10:20:48 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11A48A4F882; Wed, 23 Dec 2015 10:20:48 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D7A0B1D27; Wed, 23 Dec 2015 10:20:47 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tBNAKkkj084034; Wed, 23 Dec 2015 10:20:46 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tBNAKkPk084033; Wed, 23 Dec 2015 10:20:46 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201512231020.tBNAKkPk084033@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 23 Dec 2015 10:20:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r292653 - head/cddl/contrib/opensolaris/cmd/zdb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Dec 2015 10:20:48 -0000 Author: bapt Date: Wed Dec 23 10:20:46 2015 New Revision: 292653 URL: https://svnweb.freebsd.org/changeset/base/292653 Log: Report an error if zdb cannot initialize zfs If the zfs module is not present and not loadable, report an error to the user instead of crashing Reviewed by: mahrens Sponsored by: Gandi.net Differential Revision: https://reviews.freebsd.org/D4691 Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Wed Dec 23 10:11:54 2015 (r292652) +++ head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Wed Dec 23 10:20:46 2015 (r292653) @@ -3657,7 +3657,8 @@ main(int argc, char **argv) kernel_init(FREAD); g_zfs = libzfs_init(); - ASSERT(g_zfs != NULL); + if (g_zfs == NULL) + fatal("Fail to initialize zfs"); if (dump_all) verbose = MAX(verbose, 1);