aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--console-tools/deallocvt.c7
-rw-r--r--deallocvt.c7
2 files changed, 6 insertions, 8 deletions
diff --git a/console-tools/deallocvt.c b/console-tools/deallocvt.c
index ebdce7b24..b128c3fae 100644
--- a/console-tools/deallocvt.c
+++ b/console-tools/deallocvt.c
@@ -24,14 +24,12 @@ int deallocvt_main(int argc, char *argv[])
24 fd = get_console_fd("/dev/console"); 24 fd = get_console_fd("/dev/console");
25 25
26 if (argc == 1) { 26 if (argc == 1) {
27printf("erik: A\n");
28 /* deallocate all unused consoles */ 27 /* deallocate all unused consoles */
29 if (ioctl(fd, VT_DISALLOCATE, 0)) { 28 if (ioctl(fd, VT_DISALLOCATE, 0)) {
30 perror("VT_DISALLOCATE"); 29 perror("VT_DISALLOCATE");
31 return EXIT_FAILURE; 30 return EXIT_FAILURE;
32 } 31 }
33 } else 32 } else {
34printf("erik: B\n");
35 for (i = 1; i < argc; i++) { 33 for (i = 1; i < argc; i++) {
36 num = atoi(argv[i]); 34 num = atoi(argv[i]);
37 if (num == 0) 35 if (num == 0)
@@ -43,6 +41,7 @@ printf("erik: B\n");
43 error_msg_and_die("could not deallocate console %d\n", num); 41 error_msg_and_die("could not deallocate console %d\n", num);
44 } 42 }
45 } 43 }
46printf("erik: C\n"); 44 }
45
47 return EXIT_SUCCESS; 46 return EXIT_SUCCESS;
48} 47}
diff --git a/deallocvt.c b/deallocvt.c
index ebdce7b24..b128c3fae 100644
--- a/deallocvt.c
+++ b/deallocvt.c
@@ -24,14 +24,12 @@ int deallocvt_main(int argc, char *argv[])
24 fd = get_console_fd("/dev/console"); 24 fd = get_console_fd("/dev/console");
25 25
26 if (argc == 1) { 26 if (argc == 1) {
27printf("erik: A\n");
28 /* deallocate all unused consoles */ 27 /* deallocate all unused consoles */
29 if (ioctl(fd, VT_DISALLOCATE, 0)) { 28 if (ioctl(fd, VT_DISALLOCATE, 0)) {
30 perror("VT_DISALLOCATE"); 29 perror("VT_DISALLOCATE");
31 return EXIT_FAILURE; 30 return EXIT_FAILURE;
32 } 31 }
33 } else 32 } else {
34printf("erik: B\n");
35 for (i = 1; i < argc; i++) { 33 for (i = 1; i < argc; i++) {
36 num = atoi(argv[i]); 34 num = atoi(argv[i]);
37 if (num == 0) 35 if (num == 0)
@@ -43,6 +41,7 @@ printf("erik: B\n");
43 error_msg_and_die("could not deallocate console %d\n", num); 41 error_msg_and_die("could not deallocate console %d\n", num);
44 } 42 }
45 } 43 }
46printf("erik: C\n"); 44 }
45
47 return EXIT_SUCCESS; 46 return EXIT_SUCCESS;
48} 47}