diff options
author | John <[email protected]> | 2017-10-19 11:18:42 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2017-10-19 11:18:42 -0700 |
commit | 6044cf59cdf80d4ba94a7b6c6736cace8a7de9db (patch) | |
tree | d738c7d82af256dfee8b79c1ff6a5018aa610b34 /lib/libzfs/libzfs_dataset.c | |
parent | bbf1ad67cd0d6f3bc1e22a8a0c7448c15409d007 (diff) |
Add convenience 'zfs_get' functions
Add get functions to match existing ones.
Reviewed-by: Giuseppe Di Natale <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: John Ramsden <[email protected]>
Closes #6308
Diffstat (limited to 'lib/libzfs/libzfs_dataset.c')
-rw-r--r-- | lib/libzfs/libzfs_dataset.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/libzfs/libzfs_dataset.c b/lib/libzfs/libzfs_dataset.c index 3cf470759..0a9a4277d 100644 --- a/lib/libzfs/libzfs_dataset.c +++ b/lib/libzfs/libzfs_dataset.c @@ -64,6 +64,7 @@ #include "zfs_namecheck.h" #include "zfs_prop.h" #include "libzfs_impl.h" +#include "libzfs.h" #include "zfs_deleg.h" static int userquota_propname_decode(const char *propname, boolean_t zoned, @@ -4354,6 +4355,21 @@ error: } nvlist_t * +zfs_get_all_props(zfs_handle_t *zhp) +{ + return (zhp->zfs_props); +} + +nvlist_t * +zfs_get_recvd_props(zfs_handle_t *zhp) +{ + if (zhp->zfs_recvd_props == NULL) + if (get_recvd_props_ioctl(zhp) != 0) + return (NULL); + return (zhp->zfs_recvd_props); +} + +nvlist_t * zfs_get_user_props(zfs_handle_t *zhp) { return (zhp->zfs_user_props); |