projects
/
platform
/
upstream
/
kbd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e943cac
)
openvt: Avoid use of GNU-specific function error()
author
Alexey Gladkov
<legion@altlinux.org>
Mon, 27 Aug 2007 05:52:20 +0000
(09:52 +0400)
committer
Alexey Gladkov
<legion@altlinux.org>
Mon, 27 Aug 2007 05:52:20 +0000
(09:52 +0400)
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Alexey Gladkov <legion@altlinux.org>
openvt/openvt.c
patch
|
blob
|
history
diff --git
a/openvt/openvt.c
b/openvt/openvt.c
index
886ed72
..
8b1610c
100644
(file)
--- a/
openvt/openvt.c
+++ b/
openvt/openvt.c
@@
-107,8
+107,10
@@
main(int argc, char *argv[])
for (i=0; i<3; i++) {
struct stat st;
- if (fstat(i, &st) == -1 && open("/dev/null", O_RDWR) == -1)
- error(EXIT_FAILURE, errno, "open");
+ if (fstat(i, &st) == -1 && open("/dev/null", O_RDWR) == -1) {
+ perror("open(/dev/null) failed");
+ return EXIT_FAILURE;
+ }
}
consfd = getfd(NULL);