summaryrefslogtreecommitdiffstats
path: root/cmd/zinject/zinject.c
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2010-08-26 11:56:53 -0700
committerBrian Behlendorf <[email protected]>2010-08-31 13:42:00 -0700
commitd603ed6c278f9c25b17ba8e75e9bce6e5d715ac0 (patch)
tree61dc04f07ed9772dd97faefd879412e2a6578be0 /cmd/zinject/zinject.c
parentf1fb119f6bb0c3185ec88912e4488fdd9ec08ab2 (diff)
Add linux user disk support
This topic branch contains all the changes needed to integrate the user side zfs tools with Linux style devices. Primarily this includes fixing up the Solaris libefi library to be Linux friendly, and integrating with the libblkid library which is provided by e2fsprogs. Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'cmd/zinject/zinject.c')
-rw-r--r--cmd/zinject/zinject.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd/zinject/zinject.c b/cmd/zinject/zinject.c
index 60c53ceb3..643d73e7f 100644
--- a/cmd/zinject/zinject.c
+++ b/cmd/zinject/zinject.c
@@ -954,17 +954,20 @@ 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);