libzfs: add zfs_get_underlying_type. Stop including libzfs_impl.h in cmd

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12116
This commit is contained in:
наб
2021-05-15 12:35:46 +02:00
committed by Brian Behlendorf
parent e618e4a4ff
commit 757df52928
6 changed files with 661 additions and 641 deletions
+641 -633
View File
File diff suppressed because it is too large Load Diff
+10
View File
@@ -3333,6 +3333,16 @@ zfs_get_type(const zfs_handle_t *zhp)
return (zhp->zfs_type);
}
/*
* Returns the type of the given zfs handle,
* or, if a snapshot, the type of the snapshotted dataset.
*/
zfs_type_t
zfs_get_underlying_type(const zfs_handle_t *zhp)
{
return (zhp->zfs_head_type);
}
/*
* Is one dataset name a child dataset of another?
*