projects
/
oweals
/
busybox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Patch from David Daney:
[oweals/busybox.git]
/
libbb
/
get_terminal_width_height.c
diff --git
a/libbb/get_terminal_width_height.c
b/libbb/get_terminal_width_height.c
index ef90463fb69ef25ada9cef702c1c75814e6c1caf..7a1af6dc1dfb29a28a07ce7b22a44ccf6b10922a 100644
(file)
--- a/
libbb/get_terminal_width_height.c
+++ b/
libbb/get_terminal_width_height.c
@@
-36,7
+36,7
@@
void get_terminal_width_height(int fd, int *width, int *height)
{
struct winsize win = { 0, 0, 0, 0 };
#ifdef CONFIG_FEATURE_AUTOWIDTH
{
struct winsize win = { 0, 0, 0, 0 };
#ifdef CONFIG_FEATURE_AUTOWIDTH
- if (ioctl(
0
, TIOCGWINSZ, &win) != 0) {
+ if (ioctl(
fd
, TIOCGWINSZ, &win) != 0) {
win.ws_row = 24;
win.ws_col = 80;
}
win.ws_row = 24;
win.ws_col = 80;
}