aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuri Pankov <[email protected]>2021-04-14 19:02:16 +0300
committerBrian Behlendorf <[email protected]>2021-04-14 13:23:08 -0700
commit7bf3959601b9f0d68a5c870994121765ef05ce35 (patch)
treebb8b0b9ee6f8675d77b86acb8adfe46b15930912
parent25cd7b520d2f0597ae98d4fd9309cc5e66c55da8 (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 34742eab5..8d809acb2 100644
--- a/cmd/zpool/zpool_main.c
+++ b/cmd/zpool/zpool_main.c
@@ -6021,7 +6021,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);