Added support for ignoring '-g' per GNU ls, thanks to David Vrabel
[oweals/busybox.git] / chvt.c
diff --git a/chvt.c b/chvt.c
index 635022a57e4354f16c75b485cf3cc2281497567e..45a04397a4c39f3a7a091926310b14fdef6ef54a 100644 (file)
--- a/chvt.c
+++ b/chvt.c
 #include <stdlib.h>
 #include <fcntl.h>
 
-extern int getfd(void);
-
 int chvt_main(int argc, char **argv)
 {
        int fd, num;
 
        if ((argc != 2) || (**(argv + 1) == '-')) {
-               usage
-                       ("chvt N\n\nChange foreground virtual terminal to /dev/ttyN\n");
+               usage ("chvt N\n"
+#ifndef BB_FEATURE_TRIVIAL_HELP
+                               "\nChanges the foreground virtual terminal to /dev/ttyN\n"
+#endif
+                               );
        }
        fd = get_console_fd("/dev/console");
        num = atoi(argv[1]);
@@ -32,7 +33,7 @@ int chvt_main(int argc, char **argv)
                perror("VT_WAITACTIVE");
                exit(FALSE);
        }
-       exit(TRUE);
+       return(TRUE);
 }