mirror of
https://git.proxmox.com/git/mirror_zfs
synced 2025-04-28 06:00:44 +00:00
zpool_get_vdev_prop_value: show missing vdev userprops
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 <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Signed-off-by: Rob Norris <rob.norris@klarasystems.com> Closes #16887
This commit is contained in:
parent
30b97ce218
commit
74064cb175
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user