diff options
Diffstat (limited to 'console-tools')
-rw-r--r-- | console-tools/chvt.c | 1 | ||||
-rw-r--r-- | console-tools/clear.c | 1 | ||||
-rw-r--r-- | console-tools/deallocvt.c | 1 | ||||
-rw-r--r-- | console-tools/dumpkmap.c | 7 | ||||
-rw-r--r-- | console-tools/loadfont.c | 1 | ||||
-rw-r--r-- | console-tools/loadkmap.c | 1 | ||||
-rw-r--r-- | console-tools/openvt.c | 1 | ||||
-rw-r--r-- | console-tools/reset.c | 1 | ||||
-rw-r--r-- | console-tools/resize.c | 1 | ||||
-rw-r--r-- | console-tools/setconsole.c | 1 | ||||
-rw-r--r-- | console-tools/setkeycodes.c | 7 |
11 files changed, 15 insertions, 8 deletions
diff --git a/console-tools/chvt.c b/console-tools/chvt.c index bbc5a9c31..50908115c 100644 --- a/console-tools/chvt.c +++ b/console-tools/chvt.c @@ -15,6 +15,7 @@ enum { VT_WAITACTIVE = 0x5607 /* wait for vt active */ }; +int chvt_main(int argc, char **argv); int chvt_main(int argc, char **argv) { int fd, num; diff --git a/console-tools/clear.c b/console-tools/clear.c index 9686d5004..8e34d6d9a 100644 --- a/console-tools/clear.c +++ b/console-tools/clear.c @@ -15,6 +15,7 @@ #include "busybox.h" +int clear_main(int argc, char **argv); int clear_main(int argc, char **argv) { return printf("\033[H\033[J") != 6; diff --git a/console-tools/deallocvt.c b/console-tools/deallocvt.c index cd581b1c8..81ea68ebb 100644 --- a/console-tools/deallocvt.c +++ b/console-tools/deallocvt.c @@ -15,6 +15,7 @@ /* From <linux/vt.h> */ enum { VT_DISALLOCATE = 0x5608 }; /* free memory associated to vt */ +int deallocvt_main(int argc, char *argv[]); int deallocvt_main(int argc, char *argv[]) { /* num = 0 deallocate all unused consoles */ diff --git a/console-tools/dumpkmap.c b/console-tools/dumpkmap.c index 7c6633ae8..0c1914830 100644 --- a/console-tools/dumpkmap.c +++ b/console-tools/dumpkmap.c @@ -22,18 +22,19 @@ struct kbentry { #define NR_KEYS 128 #define MAX_NR_KEYMAPS 256 +int dumpkmap_main(int argc, char **argv); int dumpkmap_main(int argc, char **argv) { struct kbentry ke; int i, j, fd; - char flags[MAX_NR_KEYMAPS], magic[] = "bkeymap"; + char flags[MAX_NR_KEYMAPS]; - if (argc >= 2 && *argv[1] == '-') + if (argc >= 2 && argv[1][0] == '-') bb_show_usage(); fd = xopen(CURRENT_VC, O_RDWR); - write(1, magic, 7); + write(1, "bkeymap", 7); /* Here we want to set everything to 0 except for indexes: * [0-2] [4-6] [8-10] [12] */ diff --git a/console-tools/loadfont.c b/console-tools/loadfont.c index 6aa739ba4..f691b11af 100644 --- a/console-tools/loadfont.c +++ b/console-tools/loadfont.c @@ -30,6 +30,7 @@ struct psf_header { static void loadnewfont(int fd); +int loadfont_main(int argc, char **argv); int loadfont_main(int argc, char **argv) { int fd; diff --git a/console-tools/loadkmap.c b/console-tools/loadkmap.c index 74a2378b4..a141435e2 100644 --- a/console-tools/loadkmap.c +++ b/console-tools/loadkmap.c @@ -25,6 +25,7 @@ struct kbentry { #define NR_KEYS 128 #define MAX_NR_KEYMAPS 256 +int loadkmap_main(int argc, char **argv); int loadkmap_main(int argc, char **argv) { struct kbentry ke; diff --git a/console-tools/openvt.c b/console-tools/openvt.c index c7b3e4fa4..9296219bd 100644 --- a/console-tools/openvt.c +++ b/console-tools/openvt.c @@ -12,6 +12,7 @@ #include "busybox.h" +int openvt_main(int argc, char **argv); int openvt_main(int argc, char **argv) { int fd; diff --git a/console-tools/reset.c b/console-tools/reset.c index 26aab667b..03b078c5d 100644 --- a/console-tools/reset.c +++ b/console-tools/reset.c @@ -15,6 +15,7 @@ #include <unistd.h> #include "busybox.h" +int reset_main(int argc, char **argv); int reset_main(int argc, char **argv) { if (isatty(1)) { diff --git a/console-tools/resize.c b/console-tools/resize.c index c405629aa..2fe5526fb 100644 --- a/console-tools/resize.c +++ b/console-tools/resize.c @@ -9,6 +9,7 @@ /* no options, no getopt */ #include "busybox.h" +int resize_main(int argc, char **argv); int resize_main(int argc, char **argv) { struct termios old, new; diff --git a/console-tools/setconsole.c b/console-tools/setconsole.c index ef81f298b..6621d25f8 100644 --- a/console-tools/setconsole.c +++ b/console-tools/setconsole.c @@ -18,6 +18,7 @@ static const struct option setconsole_long_options[] = { #define OPT_SETCONS_RESET 1 +int setconsole_main(int argc, char **argv); int setconsole_main(int argc, char **argv) { unsigned long flags; diff --git a/console-tools/setkeycodes.c b/console-tools/setkeycodes.c index d82525786..ff137d562 100644 --- a/console-tools/setkeycodes.c +++ b/console-tools/setkeycodes.c @@ -9,9 +9,6 @@ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. */ -#include <stdio.h> -#include <stdlib.h> -#include <fcntl.h> #include <sys/ioctl.h> #include "busybox.h" @@ -24,8 +21,8 @@ enum { KDSETKEYCODE = 0x4B4D /* write kernel keycode table entry */ }; -extern int -setkeycodes_main(int argc, char** argv) +int setkeycodes_main(int argc, char** argv); +int setkeycodes_main(int argc, char** argv) { int fd, sc; struct kbkeycode a; |