diff options
Diffstat (limited to 'cmd/zinject/zinject.c')
-rw-r--r-- | cmd/zinject/zinject.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/cmd/zinject/zinject.c b/cmd/zinject/zinject.c index 3ad90e329..d584eadd8 100644 --- a/cmd/zinject/zinject.c +++ b/cmd/zinject/zinject.c @@ -566,7 +566,7 @@ main(int argc, char **argv) zinject_record_t record = { 0 }; char pool[MAXNAMELEN]; char dataset[MAXNAMELEN]; - zfs_handle_t *zhp; + zfs_handle_t *zhp = NULL; int nowrites = 0; int dur_txg = 0; int dur_secs = 0; @@ -951,20 +951,16 @@ main(int argc, char **argv) if (dataset[0] != '\0' && domount) { if ((zhp = zfs_open(g_zfs, dataset, ZFS_TYPE_DATASET)) == NULL) return (1); -#ifdef HAVE_ZPL if (zfs_unmount(zhp, NULL, 0) != 0) return (1); -#endif /* HAVE_ZPL */ } record.zi_error = error; ret = register_handler(pool, flags, &record, quiet); -#ifdef HAVE_ZPL if (dataset[0] != '\0' && domount) ret = (zfs_mount(zhp, NULL, 0) != 0); -#endif /* HAVE_ZPL */ libzfs_fini(g_zfs); |