diff options
author | Brian Behlendorf <[email protected]> | 2018-12-04 10:17:54 -0800 |
---|---|---|
committer | GitHub <[email protected]> | 2018-12-04 10:17:54 -0800 |
commit | c5eea0ab9c0ce31b172eac948c32a6cea5d0965f (patch) | |
tree | 3f8421c2b5977226bd2517ed606ad24fc1ac89dd /module/zcommon | |
parent | a0cc3726ed0b14ce43b0cfd4af4b703536a587c6 (diff) |
Fix 'zpool list -v' alignment
The verbose output of 'zpool list' was not correctly aligned due
to differences in the vdev name lengths. Minimally update the
code the correct the alignment using the same strategy employed
by 'zpool status'.
Missing dashes were added for the empty defaults columns, and
the vdev state is now printed for all vdevs.
Reviewed-by: Tom Caputi <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #7308
Closes #8147
Diffstat (limited to 'module/zcommon')
-rw-r--r-- | module/zcommon/zprop_common.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/module/zcommon/zprop_common.c b/module/zcommon/zprop_common.c index 4d856cec1..8416983fd 100644 --- a/module/zcommon/zprop_common.c +++ b/module/zcommon/zprop_common.c @@ -437,6 +437,12 @@ zprop_width(int prop, boolean_t *fixed, zfs_type_t type) */ if (prop == ZFS_PROP_CREATION) *fixed = B_FALSE; + /* + * 'health' is handled specially because it's a number + * internally, but displayed as a fixed 8 character string. + */ + if (prop == ZPOOL_PROP_HEALTH) + ret = 8; break; case PROP_TYPE_INDEX: idx = prop_tbl[prop].pd_table; |