aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorAllan Jude <[email protected]>2022-06-14 14:27:53 -0400
committerGitHub <[email protected]>2022-06-14 11:27:53 -0700
commit4ff7a8fa2f1e66c4a10ecd4fd74c9381db24fb02 (patch)
tree52e474d18dac3c3fecafee37858fbbe6c8a50a08 /cmd
parent9e605cf155040f76f3971f056a4410ac8f500fe3 (diff)
Replace ZPROP_INVAL with ZPROP_USERPROP where it means a user property
Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Allan Jude <[email protected]> Sponsored-by: Klara Inc. Closes #12676
Diffstat (limited to 'cmd')
-rw-r--r--cmd/zfs/zfs_iter.c6
-rw-r--r--cmd/zfs/zfs_main.c8
-rw-r--r--cmd/zpool/zpool_main.c4
3 files changed, 9 insertions, 9 deletions
diff --git a/cmd/zfs/zfs_iter.c b/cmd/zfs/zfs_iter.c
index d44bc2ad7..c0426d4f8 100644
--- a/cmd/zfs/zfs_iter.c
+++ b/cmd/zfs/zfs_iter.c
@@ -174,7 +174,7 @@ zfs_add_sort_column(zfs_sort_column_t **sc, const char *name,
zfs_sort_column_t *col;
zfs_prop_t prop;
- if ((prop = zfs_name_to_prop(name)) == ZPROP_INVAL &&
+ if ((prop = zfs_name_to_prop(name)) == ZPROP_USERPROP &&
!zfs_prop_user(name))
return (-1);
@@ -182,7 +182,7 @@ zfs_add_sort_column(zfs_sort_column_t **sc, const char *name,
col->sc_prop = prop;
col->sc_reverse = reverse;
- if (prop == ZPROP_INVAL) {
+ if (prop == ZPROP_USERPROP) {
col->sc_user_prop = safe_malloc(strlen(name) + 1);
(void) strcpy(col->sc_user_prop, name);
}
@@ -311,7 +311,7 @@ zfs_sort(const void *larg, const void *rarg, void *data)
* Otherwise, we compare 'lnum' and 'rnum'.
*/
lstr = rstr = NULL;
- if (psc->sc_prop == ZPROP_INVAL) {
+ if (psc->sc_prop == ZPROP_USERPROP) {
nvlist_t *luser, *ruser;
nvlist_t *lval, *rval;
diff --git a/cmd/zfs/zfs_main.c b/cmd/zfs/zfs_main.c
index 30b2ae0c4..3cb88b6a1 100644
--- a/cmd/zfs/zfs_main.c
+++ b/cmd/zfs/zfs_main.c
@@ -1917,7 +1917,7 @@ get_callback(zfs_handle_t *zhp, void *data)
pl == cbp->cb_proplist)
continue;
- if (pl->pl_prop != ZPROP_INVAL) {
+ if (pl->pl_prop != ZPROP_USERPROP) {
if (zfs_prop_get(zhp, pl->pl_prop, buf,
sizeof (buf), &sourcetype, source,
sizeof (source),
@@ -2307,7 +2307,7 @@ zfs_do_inherit(int argc, char **argv)
argc--;
argv++;
- if ((prop = zfs_name_to_prop(propname)) != ZPROP_INVAL) {
+ if ((prop = zfs_name_to_prop(propname)) != ZPROP_USERPROP) {
if (zfs_prop_readonly(prop)) {
(void) fprintf(stderr, gettext(
"%s property is read-only\n"),
@@ -3443,7 +3443,7 @@ print_header(list_cbdata_t *cb)
}
right_justify = B_FALSE;
- if (pl->pl_prop != ZPROP_INVAL) {
+ if (pl->pl_prop != ZPROP_USERPROP) {
header = zfs_prop_column_name(pl->pl_prop);
right_justify = zfs_prop_align_right(pl->pl_prop);
} else {
@@ -3494,7 +3494,7 @@ print_dataset(zfs_handle_t *zhp, list_cbdata_t *cb)
sizeof (property));
propstr = property;
right_justify = zfs_prop_align_right(pl->pl_prop);
- } else if (pl->pl_prop != ZPROP_INVAL) {
+ } else if (pl->pl_prop != ZPROP_USERPROP) {
if (zfs_prop_get(zhp, pl->pl_prop, property,
sizeof (property), NULL, NULL, 0,
cb->cb_literal) != 0)
diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c
index 598d8b1bb..a0aeb8c06 100644
--- a/cmd/zpool/zpool_main.c
+++ b/cmd/zpool/zpool_main.c
@@ -5946,7 +5946,7 @@ print_header(list_cbdata_t *cb)
first = B_FALSE;
right_justify = B_FALSE;
- if (pl->pl_prop != ZPROP_INVAL) {
+ if (pl->pl_prop != ZPROP_USERPROP) {
header = zpool_prop_column_name(pl->pl_prop);
right_justify = zpool_prop_align_right(pl->pl_prop);
} else {
@@ -6004,7 +6004,7 @@ print_pool(zpool_handle_t *zhp, list_cbdata_t *cb)
}
right_justify = B_FALSE;
- if (pl->pl_prop != ZPROP_INVAL) {
+ if (pl->pl_prop != ZPROP_USERPROP) {
if (zpool_get_prop(zhp, pl->pl_prop, property,
sizeof (property), NULL, cb->cb_literal) != 0)
propstr = "-";