diff options
author | Eric Andersen <andersen@codepoet.org> | 2003-10-22 10:34:15 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2003-10-22 10:34:15 +0000 |
commit | 7f6295f51604a97a61958909b652dcf1e0e49485 (patch) | |
tree | d54b03624a9f7076e96f6b8d1897a0a7b5db76d5 /console-tools | |
parent | 28672dd3b9ff9d27c771f011089e38a2928aded7 (diff) | |
download | busybox-7f6295f51604a97a61958909b652dcf1e0e49485.tar.gz |
Patch from Arthur Othieno for style-guide.txt conformance
Diffstat (limited to 'console-tools')
-rw-r--r-- | console-tools/clear.c | 2 | ||||
-rw-r--r-- | console-tools/deallocvt.c | 40 | ||||
-rw-r--r-- | console-tools/reset.c | 6 |
3 files changed, 36 insertions, 12 deletions
diff --git a/console-tools/clear.c b/console-tools/clear.c index 5dbe214ea..45976e1b5 100644 --- a/console-tools/clear.c +++ b/console-tools/clear.c @@ -20,6 +20,8 @@ * */ +/* no options, no getopt */ + #include <stdio.h> #include <stdlib.h> #include "busybox.h" diff --git a/console-tools/deallocvt.c b/console-tools/deallocvt.c index f641be8d7..b89249b87 100644 --- a/console-tools/deallocvt.c +++ b/console-tools/deallocvt.c @@ -1,8 +1,27 @@ /* vi: set sw=4 ts=4: */ /* - * disalloc.c - aeb - 940501 - Disallocate virtual terminal(s) - * Renamed deallocvt. + * Disallocate virtual terminal(s) + * + * Copyright (C) 2003 by Tito Ragusa <farmatito@tiscali.it> + * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +/* no options, no getopt */ + #include <stdlib.h> #include <stdio.h> #include <fcntl.h> @@ -15,21 +34,21 @@ static const int VT_DISALLOCATE = 0x5608; /* free memory associated to vt */ int deallocvt_main(int argc, char *argv[]) { - int fd, num=0; + int fd, num = 0; - if (argc > 2) + if (argc > 2) { bb_show_usage(); + } fd = get_console_fd(); /* num=0 deallocate all unused consoles */ - if (argc == 1) + if (argc == 1) { goto disallocate_all; + } - num=bb_xgetlarg(argv[1], 10, 0, INT_MAX); - - switch(num) - { + num = bb_xgetlarg(argv[1], 10, 0, INT_MAX); + switch (num) { case 0: bb_error_msg("0: illegal VT number"); break; @@ -38,8 +57,9 @@ int deallocvt_main(int argc, char *argv[]) break; default: disallocate_all: - if (ioctl(fd, VT_DISALLOCATE, num)) + if (ioctl(fd, VT_DISALLOCATE, num)) { bb_perror_msg_and_die("VT_DISALLOCATE"); + } return EXIT_SUCCESS; } return EXIT_FAILURE; diff --git a/console-tools/reset.c b/console-tools/reset.c index 69b1e846a..a3f01aab0 100644 --- a/console-tools/reset.c +++ b/console-tools/reset.c @@ -21,13 +21,15 @@ * */ +/* no options, no getopt */ + #include <stdio.h> #include <stdlib.h> #include "busybox.h" extern int reset_main(int argc, char **argv) { - printf("\033[?25h\033c\033[J"); - return EXIT_SUCCESS; + printf("\033[?25h\033c\033[J"); + return EXIT_SUCCESS; } |