aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuri Pankov <[email protected]>2021-04-14 19:02:16 +0300
committerTony Hutter <[email protected]>2021-06-23 13:22:14 -0700
commite69f73c5cf934f1ffe0faa60072f3a74ff6643e5 (patch)
tree65b2b6b108946cef6fd3714d40f0273ac84c99e5
parent3430eced806fc5a8be24900f217898a0ae2dfe69 (diff)
Fix vdev health padding in zpool list -v
Do not (incorrectly, right instead left) pad health string itself, it will be taken care of when printing property value below. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Yuri Pankov <[email protected]> Closes #11899
-rw-r--r--cmd/zpool/zpool_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c
index 9bd9bfe9c..3ce27be29 100644
--- a/cmd/zpool/zpool_main.c
+++ b/cmd/zpool/zpool_main.c
@@ -5950,7 +5950,7 @@ print_one_column(zpool_prop_t prop, uint64_t value, const char *str,
break;
case ZPOOL_PROP_HEALTH:
width = 8;
- snprintf(propval, sizeof (propval), "%-*s", (int)width, str);
+ (void) strlcpy(propval, str, sizeof (propval));
break;
default:
zfs_nicenum_format(value, propval, sizeof (propval), format);