projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2b57b6c
)
getty: more correct check for O_RDWR
author
Denys Vlasenko
<vda.linux@googlemail.com>
Sat, 22 Jan 2011 16:29:53 +0000
(17:29 +0100)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Sat, 22 Jan 2011 16:29:53 +0000
(17:29 +0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
loginutils/getty.c
patch
|
blob
|
history
diff --git
a/loginutils/getty.c
b/loginutils/getty.c
index 94c9147abebc3786592f1d66efd69e74d3b01242..015f077d6135d958c6de341422a5cbcae9c9d64d 100644
(file)
--- a/
loginutils/getty.c
+++ b/
loginutils/getty.c
@@
-268,7
+268,7
@@
static void open_tty(const char *tty)
* Standard input should already be connected to an open port. Make
* sure it is open for read/write.
*/
- if ((fcntl(0, F_GETFL) &
O_RDWR
) != O_RDWR)
+ if ((fcntl(0, F_GETFL) &
(O_RDWR|O_RDONLY|O_WRONLY)
) != O_RDWR)
bb_error_msg_and_die("stdin is not open for read/write");
}
}