Wrap a table (bg set to black, width=80%) around the screenshot
[oweals/busybox.git] / deallocvt.c
index b128c3fae562d63b179bd9bf2a9f17cae139f081..fad7a2bb211567a80f83e88cbe624af550516610 100644 (file)
@@ -11,7 +11,7 @@
 #include <sys/ioctl.h>
 
 /* From <linux/vt.h> */
-#define VT_DISALLOCATE  0x5608  /* free memory associated to vt */
+static const int VT_DISALLOCATE = 0x5608;  /* free memory associated to vt */
 
 int deallocvt_main(int argc, char *argv[])
 {
@@ -25,10 +25,8 @@ int deallocvt_main(int argc, char *argv[])
 
        if (argc == 1) {
                /* deallocate all unused consoles */
-               if (ioctl(fd, VT_DISALLOCATE, 0)) {
-                       perror("VT_DISALLOCATE");
-                       return EXIT_FAILURE;
-               }
+               if (ioctl(fd, VT_DISALLOCATE, 0))
+                       perror_msg_and_die("VT_DISALLOCATE");
        } else {
                for (i = 1; i < argc; i++) {
                        num = atoi(argv[i]);
@@ -36,10 +34,8 @@ int deallocvt_main(int argc, char *argv[])
                                error_msg("0: illegal VT number\n");
                        else if (num == 1)
                                error_msg("VT 1 cannot be deallocated\n");
-                       else if (ioctl(fd, VT_DISALLOCATE, num)) {
-                               perror("VT_DISALLOCATE");
-                               error_msg_and_die("could not deallocate console %d\n", num);
-                       }
+                       else if (ioctl(fd, VT_DISALLOCATE, num))
+                               perror_msg_and_die("VT_DISALLOCATE");
                }
        }