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 <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Yuri Pankov <yuripv@FreeBSD.org>
Closes #11899
This commit is contained in:
Yuri Pankov 2021-04-14 19:02:16 +03:00 committed by Tony Hutter
parent 3430eced80
commit e69f73c5cf
1 changed files with 1 additions and 1 deletions

View File

@ -5950,7 +5950,7 @@ print_one_column(zpool_prop_t prop, uint64_t value, const char *str,
break; break;
case ZPOOL_PROP_HEALTH: case ZPOOL_PROP_HEALTH:
width = 8; width = 8;
snprintf(propval, sizeof (propval), "%-*s", (int)width, str); (void) strlcpy(propval, str, sizeof (propval));
break; break;
default: default:
zfs_nicenum_format(value, propval, sizeof (propval), format); zfs_nicenum_format(value, propval, sizeof (propval), format);