From: Eric Andersen Date: Wed, 22 Oct 2003 10:34:15 +0000 (-0000) Subject: Patch from Arthur Othieno for style-guide.txt conformance X-Git-Tag: 1_00_pre4~111 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=7f6295f51604a97a61958909b652dcf1e0e49485;p=oweals%2Fbusybox.git Patch from Arthur Othieno for style-guide.txt conformance --- 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 #include #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 + * Copyright (C) 1999-2003 by Erik Andersen + * + * 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 #include #include @@ -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 #include #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; }