Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Mar 2016 00:47:04 +0100
From:      Dimitry Andric <dim@FreeBSD.org>
To:        Alexander Motin <mav@FreeBSD.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   Re: svn commit: r297089 - stable/10/cddl/contrib/opensolaris/cmd/zdb
Message-ID:  <603EBC56-4354-4B9F-AA60-0496DBF3EBF7@FreeBSD.org>
In-Reply-To: <201603202329.u2KNTwSs018607@repo.freebsd.org>
References:  <201603202329.u2KNTwSs018607@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
On 21 Mar 2016, at 00:29, Alexander Motin <mav@FreeBSD.org> wrote:
> Author: mav
> Date: Sun Mar 20 23:29:58 2016
> New Revision: 297089
> URL: https://svnweb.freebsd.org/changeset/base/297089
> 
> Log:
>  MFC r292653 (by bapt): 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
> 
>  Differential Revision:  https://reviews.freebsd.org/D4691
> 
> Modified:
>  stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c
> Directory Properties:
>  stable/10/   (props changed)
> 
> Modified: stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c
> ==============================================================================
> --- stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c	Sun Mar 20 23:26:52 2016	(r297088)
> +++ stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c	Sun Mar 20 23:29:58 2016	(r297089)
> @@ -3658,7 +3658,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");

Minor nit: "Failed to" or "Unable to" is probably better here.

-Dimitry


[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.29

iEYEARECAAYFAlbvNngACgkQsF6jCi4glqPliwCdEmRDS9RWotYMqJCuEduurAyT
1XwAoMG+kAp5Qm7K+t8TgU0KgSBcjrTp
=sILT
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?603EBC56-4354-4B9F-AA60-0496DBF3EBF7>