Date: Wed, 23 Dec 2015 10:20:46 +0000 (UTC) From: Baptiste Daroussin <bapt@FreeBSD.org> 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 Message-ID: <201512231020.tBNAKkPk084033@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201512231020.tBNAKkPk084033>