zfs/cmd/zpool
Philip Pokorny a36bad1759
Fix column width calculation issue with certain terminal widths
If the reported terminal width is 0 or less than 42, the signed variable
width was set to a negative number that was then assigned to the
unsigned column width becoming a huge number.

Add comments and change logic to better explain what's happening.

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Philip Pokorny <ppokorny@mindspring.com>
Closes #10247
2020-05-06 17:17:38 -07:00
..
os Add FreeBSD support to OpenZFS 2020-04-14 11:36:28 -07:00
zpool.d Fix SC2086 note in zpool.d/smart 2020-04-14 13:18:23 -07:00
.gitignore Add .gitignore files to exclude build products 2010-01-08 11:35:17 -08:00
Makefile.am Add FreeBSD support to OpenZFS 2020-04-14 11:36:28 -07:00
zpool_iter.c Add libzutil for libzfs or libzpool consumers 2018-11-05 11:22:33 -08:00
zpool_main.c Fix column width calculation issue with certain terminal widths 2020-05-06 17:17:38 -07:00
zpool_util.c OpenZFS restructuring - zpool 2019-09-30 12:16:06 -07:00
zpool_util.h Fix static data to link with -fno-common 2020-02-06 09:25:29 -08:00
zpool_vdev.c Add FreeBSD support to OpenZFS 2020-04-14 11:36:28 -07:00