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:
064e996
)
cttyhack: fail gracefully if the device node is missing
author
Kevin Cernekee
<cernekee@gmail.com>
Wed, 13 Jul 2011 07:30:36 +0000
(09:30 +0200)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Wed, 13 Jul 2011 07:30:36 +0000
(09:30 +0200)
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
shell/cttyhack.c
patch
|
blob
|
history
diff --git
a/shell/cttyhack.c
b/shell/cttyhack.c
index 522a1ba737ef062b0a4b0853913e3f137c3e30f7..4261289b45da7b8e58540cf59f40d1ebf1255ffb 100644
(file)
--- a/
shell/cttyhack.c
+++ b/
shell/cttyhack.c
@@
-146,7
+146,9
@@
int cttyhack_main(int argc UNUSED_PARAM, char **argv)
goto ret;
} while (0);
- fd = xopen(console, O_RDWR);
+ fd = open_or_warn(console, O_RDWR);
+ if (fd < 0)
+ goto ret;
//bb_error_msg("switching to '%s'", console);
dup2(fd, 0);
dup2(fd, 1);