From e69f73c5cf934f1ffe0faa60072f3a74ff6643e5 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 9bd9bfe9ce..3ce27be29c 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);