Making note of my changes
[oweals/busybox.git] / deallocvt.c
index a8feeb53c90d1ac8e4b4cd336c3345d50393687c..1e13ff69cef561b310453195fcb12c4b51a60d68 100644 (file)
@@ -2,6 +2,7 @@
  * disalloc.c - aeb - 940501 - Disallocate virtual terminal(s)
  * Renamed deallocvt.
  */
+#include "internal.h"
 #include <stdlib.h>
 #include <fcntl.h>
 #include <sys/types.h>
@@ -16,8 +17,10 @@ int
 deallocvt_main(int argc, char *argv[]) {
     int fd, num, i;
 
-    if (argc < 1)              /* unlikely */
-      exit(1);
+    if ( ( argc != 2) || (**(argv+1) == '-' ) ) {
+       usage ("deallocvt N\n\nDeallocate unused virtual terminal /dev/ttyN\n");
+    }
+
     progname = argv[0];
 
     fd = get_console_fd("/dev/console");