Skip to content

Commit 779c5a5

Browse files
robnbehlendorf
authored andcommitted
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 <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Signed-off-by: Rob Norris <[email protected]> Closes #16887
1 parent 89f796d commit 779c5a5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/libzfs/libzfs_pool.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5342,7 +5342,8 @@ zpool_get_vdev_prop_value(nvlist_t *nvprop, vdev_prop_t prop, char *prop_name,
53425342
strval = fnvlist_lookup_string(nv, ZPROP_VALUE);
53435343
} else {
53445344
/* user prop not found */
5345-
return (-1);
5345+
src = ZPROP_SRC_DEFAULT;
5346+
strval = "-";
53465347
}
53475348
(void) strlcpy(buf, strval, len);
53485349
if (srctype)

0 commit comments

Comments
 (0)