svn commit: r297089 - stable/10/cddl/contrib/opensolaris/cmd/zdb

Dimitry Andric dim at FreeBSD.org
Sun Mar 20 23:47:09 UTC 2016


On 21 Mar 2016, at 00:29, Alexander Motin <mav at 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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/svn-src-stable-10/attachments/20160321/147e28ce/attachment.sig>


More information about the svn-src-stable-10 mailing list