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
This commit is contained in:
parent
cde5c65b52
commit
5275d9d01c
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user