summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-08-31 16:53:58 +0200
committerLennart Poettering <lennart@poettering.net>2010-08-31 16:53:58 +0200
commit9ed95f433630f11c54e852f2826e9d68efff81f0 (patch)
treed42439daea9209acce45b242981281b09d212657 /src
parentdd6c17b1595ff8a78ebae6cf571fd222c80bfd17 (diff)
util: look at STDOUT, not STDIN, when determining tty columns
https://bugzilla.redhat.com/show_bug.cgi?id=626891
Diffstat (limited to 'src')
-rw-r--r--src/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util.c b/src/util.c
index a09b704ffe..f982586cee 100644
--- a/src/util.c
+++ b/src/util.c
@@ -2988,7 +2988,7 @@ int columns(void) {
struct winsize ws;
zero(ws);
- if (ioctl(STDIN_FILENO, TIOCGWINSZ, &ws) >= 0)
+ if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &ws) >= 0)
parsed_columns = ws.ws_col;
}