aboutsummaryrefslogtreecommitdiff
path: root/console-tools/deallocvt.c
diff options
context:
space:
mode:
Diffstat (limited to 'console-tools/deallocvt.c')
-rw-r--r--console-tools/deallocvt.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/console-tools/deallocvt.c b/console-tools/deallocvt.c
index b7dcc9e22..a4ba851c8 100644
--- a/console-tools/deallocvt.c
+++ b/console-tools/deallocvt.c
@@ -19,23 +19,23 @@ int deallocvt_main(int argc, char *argv[])
19 19
20 //if ((argc > 2) || ((argv == 2) && (**(argv + 1) == '-'))) 20 //if ((argc > 2) || ((argv == 2) && (**(argv + 1) == '-')))
21 if (argc > 2) 21 if (argc > 2)
22 show_usage(); 22 bb_show_usage();
23 23
24 fd = get_console_fd(); 24 fd = get_console_fd();
25 25
26 if (argc == 1) { 26 if (argc == 1) {
27 /* deallocate all unused consoles */ 27 /* deallocate all unused consoles */
28 if (ioctl(fd, VT_DISALLOCATE, 0)) 28 if (ioctl(fd, VT_DISALLOCATE, 0))
29 perror_msg_and_die("VT_DISALLOCATE"); 29 bb_perror_msg_and_die("VT_DISALLOCATE");
30 } else { 30 } else {
31 for (i = 1; i < argc; i++) { 31 for (i = 1; i < argc; i++) {
32 num = atoi(argv[i]); 32 num = atoi(argv[i]);
33 if (num == 0) 33 if (num == 0)
34 error_msg("0: illegal VT number"); 34 bb_error_msg("0: illegal VT number");
35 else if (num == 1) 35 else if (num == 1)
36 error_msg("VT 1 cannot be deallocated"); 36 bb_error_msg("VT 1 cannot be deallocated");
37 else if (ioctl(fd, VT_DISALLOCATE, num)) 37 else if (ioctl(fd, VT_DISALLOCATE, num))
38 perror_msg_and_die("VT_DISALLOCATE"); 38 bb_perror_msg_and_die("VT_DISALLOCATE");
39 } 39 }
40 } 40 }
41 41