Skip to content

Commit

Permalink
zpool_get_vdev_prop_value: show missing vdev userprops
Browse files Browse the repository at this point in the history
If a vdev userprop is not found, present it as value '-', default
source, so it matches the output from pool userprops.

Sponsored-by: Klara, Inc.
Sponsored-by: Wasabi Technology, Inc.
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Alexander Motin <[email protected]>
Signed-off-by: Rob Norris <[email protected]>
Closes #16887
  • Loading branch information
robn authored and behlendorf committed Dec 29, 2024
1 parent 89f796d commit 779c5a5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/libzfs/libzfs_pool.c
Original file line number Diff line number Diff line change
Expand Up @@ -5342,7 +5342,8 @@ zpool_get_vdev_prop_value(nvlist_t *nvprop, vdev_prop_t prop, char *prop_name,
strval = fnvlist_lookup_string(nv, ZPROP_VALUE);
} else {
/* user prop not found */
return (-1);
src = ZPROP_SRC_DEFAULT;
strval = "-";
}
(void) strlcpy(buf, strval, len);
if (srctype)
Expand Down

0 comments on commit 779c5a5

Please sign in to comment.