Changed bb_regcomp to xregcomp and #if 0'ed out destroy_cmd_strs in sed.c
[oweals/busybox.git] / chvt.c
diff --git a/chvt.c b/chvt.c
index a32bd3e783f9312ab7848d3ac4786588e1bda834..c5c86b61331a66ce894054d30ccea5e844409ff7 100644 (file)
--- a/chvt.c
+++ b/chvt.c
@@ -5,22 +5,27 @@
  * busyboxed by Erik Andersen
  */
 #include "internal.h"
-#include <sys/types.h>
-#include <sys/ioctl.h>
-#include <linux/vt.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <fcntl.h>
+#include <sys/types.h>
+#include <sys/ioctl.h>
+
+/* From <linux/vt.h> */
+#define VT_ACTIVATE     0x5606  /* make vt active */
+#define VT_WAITACTIVE   0x5607  /* wait for vt active */
 
-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,5 +37,14 @@ int chvt_main(int argc, char **argv)
                perror("VT_WAITACTIVE");
                exit(FALSE);
        }
-       exit(TRUE);
+       return(TRUE);
 }
+
+
+/*
+Local Variables:
+c-file-style: "linux"
+c-basic-offset: 4
+tab-width: 4
+End:
+*/