]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Fix column width in 'zpool iostat -v' and 'zpool list -v'
authorSamuel <50765275+npc203@users.noreply.github.com>
Tue, 6 Sep 2022 16:37:47 +0000 (22:07 +0530)
committerTony Hutter <hutter2@llnl.gov>
Wed, 14 Sep 2022 16:57:05 +0000 (09:57 -0700)
This commit fixes a minor spacing issue caused when
enumerating vdev names, which originated from #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 #13811

cmd/zpool/zpool_main.c

index b93a6196beea280437107f7bf8ca4d5e9a9835be..b2e7dc4a5b4df08845e78eb3ef42b5ff2dfa4ae5 100644 (file)
@@ -5458,8 +5458,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_name_flags,
-           cb->cb_verbose);
+       width = get_namewidth(zhp, cb->cb_namewidth,
+           cb->cb_name_flags | VDEV_NAME_TYPE_ID, cb->cb_verbose);
 
        /*
         * The width we are calculating is the width of the header and also the
@@ -6282,8 +6282,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;