| * disalloc.c - aeb - 940501 - Disallocate virtual terminal(s) |
| static const int VT_DISALLOCATE = 0x5608; /* free memory associated to vt */ |
| int deallocvt_main(int argc, char *argv[]) |
| //if ((argc > 2) || ((argv == 2) && (**(argv + 1) == '-'))) |
| fd = get_console_fd("/dev/console"); |
| /* deallocate all unused consoles */ |
| if (ioctl(fd, VT_DISALLOCATE, 0)) |
| perror_msg_and_die("VT_DISALLOCATE"); |
| for (i = 1; i < argc; i++) { |
| error_msg("0: illegal VT number"); |
| error_msg("VT 1 cannot be deallocated"); |
| else if (ioctl(fd, VT_DISALLOCATE, num)) |
| perror_msg_and_die("VT_DISALLOCATE"); |