openvt: Avoid use of GNU-specific function error()
authorAlexey Gladkov <legion@altlinux.org>
Mon, 27 Aug 2007 05:52:20 +0000 (09:52 +0400)
committerAlexey 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

index 886ed72..8b1610c 100644 (file)
@@ -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);