diff options
Diffstat (limited to 'cmd/zpool/zpool_main.c')
-rw-r--r-- | cmd/zpool/zpool_main.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c index 4965cba52..301c5f4bf 100644 --- a/cmd/zpool/zpool_main.c +++ b/cmd/zpool/zpool_main.c @@ -6071,11 +6071,14 @@ print_pool(zpool_handle_t *zhp, list_cbdata_t *cb) zpool_prop_get_feature(zhp, pl->pl_user_prop, property, sizeof (property)) == 0) { propstr = property; + } else if (zfs_prop_user(pl->pl_user_prop) && + zpool_get_userprop(zhp, pl->pl_user_prop, property, + sizeof (property), NULL) == 0) { + propstr = property; } else { propstr = "-"; } - /* * If this is being called in scripted mode, or if this is the * last column and it is left-justified, don't include a width @@ -10035,7 +10038,7 @@ static int get_callback(zpool_handle_t *zhp, void *data) { zprop_get_cbdata_t *cbp = (zprop_get_cbdata_t *)data; - char value[MAXNAMELEN]; + char value[ZFS_MAXPROPLEN]; zprop_source_t srctype; zprop_list_t *pl; int vid; @@ -10070,6 +10073,17 @@ get_callback(zpool_handle_t *zhp, void *data) continue; if (pl->pl_prop == ZPROP_INVAL && + zfs_prop_user(pl->pl_user_prop)) { + srctype = ZPROP_SRC_LOCAL; + + if (zpool_get_userprop(zhp, pl->pl_user_prop, + value, sizeof (value), &srctype) != 0) + continue; + + zprop_print_one_property(zpool_get_name(zhp), + cbp, pl->pl_user_prop, value, srctype, + NULL, NULL); + } else if (pl->pl_prop == ZPROP_INVAL && (zpool_prop_feature(pl->pl_user_prop) || zpool_prop_unsupported(pl->pl_user_prop))) { srctype = ZPROP_SRC_LOCAL; |