From 96904d879cc0a8ec3485806150a7e0311aa907bd Mon Sep 17 00:00:00 2001 From: Yuri Pankov <82001006+yuripv@users.noreply.github.com> Date: Wed, 14 Apr 2021 19:02:16 +0300 Subject: [PATCH] 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 Reviewed-by: Ryan Moeller Signed-off-by: Yuri Pankov Closes #11899 --- cmd/zpool/zpool_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c index 34742eab5d30..8d809acb2146 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);