Skip to content

Commit

Permalink
Fix column width in 'zpool iostat -v' and 'zpool list -v'
Browse files Browse the repository at this point in the history
This commit fixes a minor spacing issue caused when
enumerating vdev names, which originated from openzfs#13031

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Akash B <akash-b@hpe.com>
Signed-off-by: Samuel Wycliffe <samuelwycliffe@gmail.com>
Closes openzfs#13811
  • Loading branch information
npc203 authored and beren12 committed Sep 19, 2022
1 parent 1adc6f9 commit e6e0d95
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/zpool/zpool_main.c
Expand Up @@ -5466,8 +5466,8 @@ get_namewidth_iostat(zpool_handle_t *zhp, void *data)
* get_namewidth() returns the maximum width of any name in that column
* for any pool/vdev/device line that will be output.
*/
width = get_namewidth(zhp, cb->cb_namewidth, cb->cb_vdevs.cb_name_flags,
cb->cb_verbose);
width = get_namewidth(zhp, cb->cb_namewidth,
cb->cb_vdevs.cb_name_flags | VDEV_NAME_TYPE_ID, cb->cb_verbose);

/*
* The width we are calculating is the width of the header and also the
Expand Down Expand Up @@ -6298,8 +6298,8 @@ get_namewidth_list(zpool_handle_t *zhp, void *data)
list_cbdata_t *cb = data;
int width;

width = get_namewidth(zhp, cb->cb_namewidth, cb->cb_name_flags,
cb->cb_verbose);
width = get_namewidth(zhp, cb->cb_namewidth,
cb->cb_name_flags | VDEV_NAME_TYPE_ID, cb->cb_verbose);

if (width < 9)
width = 9;
Expand Down

0 comments on commit e6e0d95

Please sign in to comment.