aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/zfs
diff options
context:
space:
mode:
authorнаб <[email protected]>2021-05-15 12:35:46 +0200
committerBrian Behlendorf <[email protected]>2021-05-29 14:26:38 -0700
commit757df529280d789029bb91761e31031c45c68b8f (patch)
treea0e62776be6719ad007d803da1634a9a26b9ca05 /cmd/zfs
parente618e4a4ff0b0512e6b6a5230d101a4baad1aabd (diff)
libzfs: add zfs_get_underlying_type. Stop including libzfs_impl.h in cmd
Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #12116
Diffstat (limited to 'cmd/zfs')
-rw-r--r--cmd/zfs/zfs_main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd/zfs/zfs_main.c b/cmd/zfs/zfs_main.c
index 24ff074c4..c583053db 100644
--- a/cmd/zfs/zfs_main.c
+++ b/cmd/zfs/zfs_main.c
@@ -52,6 +52,8 @@
#include <zone.h>
#include <grp.h>
#include <pwd.h>
+#include <umem.h>
+#include <pthread.h>
#include <signal.h>
#include <sys/list.h>
#include <sys/mkdev.h>
@@ -78,7 +80,6 @@
#include "zfs_iter.h"
#include "zfs_util.h"
#include "zfs_comutil.h"
-#include "libzfs_impl.h"
#include "zfs_projectutil.h"
libzfs_handle_t *g_zfs;
@@ -3315,7 +3316,7 @@ zfs_do_userspace(int argc, char **argv)
if ((zhp = zfs_path_to_zhandle(g_zfs, argv[0], ZFS_TYPE_FILESYSTEM |
ZFS_TYPE_SNAPSHOT)) == NULL)
return (1);
- if (zhp->zfs_head_type != ZFS_TYPE_FILESYSTEM) {
+ if (zfs_get_underlying_type(zhp) != ZFS_TYPE_FILESYSTEM) {
(void) fprintf(stderr, gettext("operation is only applicable "
"to filesystems and their snapshots\n"));
zfs_close(zhp);