Add linux ztest support
[zfs.git] / cmd / zdb / zdb.c
index 1a458f6..a5ad7fe 100644 (file)
@@ -55,7 +55,6 @@
 #include <sys/arc.h>
 #include <sys/ddt.h>
 #undef ZFS_MAXNAMELEN
-#undef verify
 #include <libzfs.h>
 
 #define        ZDB_COMPRESS_NAME(idx) ((idx) < ZIO_COMPRESS_FUNCTIONS ? \
@@ -2888,7 +2887,7 @@ find_zpool(char **target, nvlist_t **configp, int dirc, char **dirv)
        nvlist_t *match = NULL;
        char *name = NULL;
        char *sepp = NULL;
-       char sep;
+       char sep = 0;
        int count = 0;
        importargs_t args = { 0 };
 
@@ -3037,8 +3036,8 @@ main(int argc, char **argv)
        }
 
        kernel_init(FREAD);
-       g_zfs = libzfs_init();
-       ASSERT(g_zfs != NULL);
+       if ((g_zfs = libzfs_init()) == NULL)
+               return (1);
 
        if (dump_all)
                verbose = MAX(verbose, 1);