mirror of
https://git.proxmox.com/git/mirror_zfs
synced 2025-04-30 16:04:29 +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
89f796dec6
commit
779c5a5deb
@ -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);
|
strval = fnvlist_lookup_string(nv, ZPROP_VALUE);
|
||||||
} else {
|
} else {
|
||||||
/* user prop not found */
|
/* user prop not found */
|
||||||
return (-1);
|
src = ZPROP_SRC_DEFAULT;
|
||||||
|
strval = "-";
|
||||||
}
|
}
|
||||||
(void) strlcpy(buf, strval, len);
|
(void) strlcpy(buf, strval, len);
|
||||||
if (srctype)
|
if (srctype)
|
||||||
|
Loading…
Reference in New Issue
Block a user