chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dd6c17b
)
util: look at STDOUT, not STDIN, when determining tty columns
author
Lennart Poettering
<lennart@poettering.net>
Tue, 31 Aug 2010 14:53:58 +0000
(16:53 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Tue, 31 Aug 2010 14:53:58 +0000
(16:53 +0200)
https://bugzilla.redhat.com/show_bug.cgi?id=626891
src/util.c
patch
|
blob
|
history
diff --git
a/src/util.c
b/src/util.c
index a09b704ffebd1e2195a17b6b4a95fdab717afdb2..f982586cee9b1d2c1939e8b7f8d4ecd13a3e5e81 100644
(file)
--- a/
src/util.c
+++ b/
src/util.c
@@
-2988,7
+2988,7
@@
int columns(void) {
struct winsize ws;
zero(ws);
- if (ioctl(STD
IN
_FILENO, TIOCGWINSZ, &ws) >= 0)
+ if (ioctl(STD
OUT
_FILENO, TIOCGWINSZ, &ws) >= 0)
parsed_columns = ws.ws_col;
}