aboutsummaryrefslogtreecommitdiff
path: root/deallocvt.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2000-09-23 19:55:59 +0000
committerEric Andersen <andersen@codepoet.org>2000-09-23 19:55:59 +0000
commit32e95f988d3a395de375296ac4f955cc330d39bf (patch)
tree6856d72dad548c58f8e1357815a3c491218b5305 /deallocvt.c
parent96bdde97fb7ebb44a89404bb87dc8e8cd4ec7446 (diff)
downloadbusybox-w32-32e95f988d3a395de375296ac4f955cc330d39bf.tar.gz
busybox-w32-32e95f988d3a395de375296ac4f955cc330d39bf.tar.bz2
busybox-w32-32e95f988d3a395de375296ac4f955cc330d39bf.zip
Fix the bandaid.
Diffstat (limited to '')
-rw-r--r--deallocvt.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/deallocvt.c b/deallocvt.c
index a5b5a03f0..bb9632fde 100644
--- a/deallocvt.c
+++ b/deallocvt.c
@@ -17,18 +17,21 @@ int deallocvt_main(int argc, char *argv[])
17{ 17{
18 int fd, num, i; 18 int fd, num, i;
19 19
20 if ((argc > 2) || ((argv == 2) && (**(argv + 1) == '-'))) 20 //if ((argc > 2) || ((argv == 2) && (**(argv + 1) == '-')))
21 if (argc > 2)
21 usage(deallocvt_usage); 22 usage(deallocvt_usage);
22 23
23 fd = get_console_fd("/dev/console"); 24 fd = get_console_fd("/dev/console");
24 25
25 if (argc == 1) { 26 if (argc == 1) {
27printf("erik: A\n");
26 /* deallocate all unused consoles */ 28 /* deallocate all unused consoles */
27 if (ioctl(fd, VT_DISALLOCATE, 0)) { 29 if (ioctl(fd, VT_DISALLOCATE, 0)) {
28 perror("VT_DISALLOCATE"); 30 perror("VT_DISALLOCATE");
29 exit( FALSE); 31 exit( FALSE);
30 } 32 }
31 } else 33 } else
34printf("erik: B\n");
32 for (i = 1; i < argc; i++) { 35 for (i = 1; i < argc; i++) {
33 num = atoi(argv[i]); 36 num = atoi(argv[i]);
34 if (num == 0) 37 if (num == 0)
@@ -37,9 +40,9 @@ int deallocvt_main(int argc, char *argv[])
37 errorMsg("VT 1 cannot be deallocated\n"); 40 errorMsg("VT 1 cannot be deallocated\n");
38 else if (ioctl(fd, VT_DISALLOCATE, num)) { 41 else if (ioctl(fd, VT_DISALLOCATE, num)) {
39 perror("VT_DISALLOCATE"); 42 perror("VT_DISALLOCATE");
40 errorMsg("could not deallocate console %d\n", num); 43 fatalError("could not deallocate console %d\n", num);
41 exit( FALSE);
42 } 44 }
43 } 45 }
46printf("erik: C\n");
44 return( TRUE); 47 return( TRUE);
45} 48}