mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 19:28:53 +03:00
Replace ZPROP_INVAL with ZPROP_USERPROP where it means a user property
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Allan Jude <allan@klarasystems.com> Sponsored-by: Klara Inc. Closes #12676
This commit is contained in:
@@ -1282,7 +1282,7 @@ zprop_print_headers(zprop_get_cbdata_t *cbp, zfs_type_t type)
|
||||
/*
|
||||
* 'PROPERTY' column
|
||||
*/
|
||||
if (pl->pl_prop != ZPROP_INVAL) {
|
||||
if (pl->pl_prop != ZPROP_USERPROP) {
|
||||
const char *propname = (type == ZFS_TYPE_POOL) ?
|
||||
zpool_prop_to_name(pl->pl_prop) :
|
||||
((type == ZFS_TYPE_VDEV) ?
|
||||
@@ -1755,7 +1755,7 @@ addlist(libzfs_handle_t *hdl, const char *propname, zprop_list_t **listp,
|
||||
* Return failure if no property table entry was found and this isn't
|
||||
* a user-defined property.
|
||||
*/
|
||||
if (prop == ZPROP_INVAL && ((type == ZFS_TYPE_POOL &&
|
||||
if (prop == ZPROP_USERPROP && ((type == ZFS_TYPE_POOL &&
|
||||
!zpool_prop_feature(propname) &&
|
||||
!zpool_prop_unsupported(propname)) ||
|
||||
((type == ZFS_TYPE_DATASET) && !zfs_prop_user(propname) &&
|
||||
@@ -1770,7 +1770,7 @@ addlist(libzfs_handle_t *hdl, const char *propname, zprop_list_t **listp,
|
||||
zprop_list_t *entry = zfs_alloc(hdl, sizeof (*entry));
|
||||
|
||||
entry->pl_prop = prop;
|
||||
if (prop == ZPROP_INVAL) {
|
||||
if (prop == ZPROP_USERPROP) {
|
||||
entry->pl_user_prop = zfs_strdup(hdl, propname);
|
||||
entry->pl_width = strlen(propname);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user