mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-29 03:45:02 +01:00
zpool: things get messy with 0 columns
zpool iostat with terminal reporting 0 columns will print out a very long line. Use columns 80 when query reports 0. Reviewed-by: Tony Hutter <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Toomas Soome <[email protected]> Closes #19051
This commit is contained in:
1 parent
588012797f
commit
ba524e0d7c
1 file changed
+1
-1
@@ -5872,7 +5872,7 @@ get_columns(void)
|
||||
|
||||
if (isatty(STDOUT_FILENO)) {
|
||||
error = ioctl(STDOUT_FILENO, TIOCGWINSZ, &ws);
|
||||
if (error == 0)
|
||||
if (error == 0 && ws.ws_col > 0)
|
||||
columns = ws.ws_col;
|
||||
} else {
|
||||
columns = 999;
|
||||
|
||||
Reference in new issue
Block a user