summaryrefslogtreecommitdiff
path: root/console-tools
diff options
context:
space:
mode:
Diffstat (limited to 'console-tools')
-rw-r--r--console-tools/chvt.c1
-rw-r--r--console-tools/clear.c1
-rw-r--r--console-tools/deallocvt.c1
-rw-r--r--console-tools/dumpkmap.c7
-rw-r--r--console-tools/loadfont.c1
-rw-r--r--console-tools/loadkmap.c1
-rw-r--r--console-tools/openvt.c1
-rw-r--r--console-tools/reset.c1
-rw-r--r--console-tools/resize.c1
-rw-r--r--console-tools/setconsole.c1
-rw-r--r--console-tools/setkeycodes.c7
11 files changed, 15 insertions, 8 deletions
diff --git a/console-tools/chvt.c b/console-tools/chvt.c
index bbc5a9c..5090811 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 9686d50..8e34d6d 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 cd581b1..81ea68e 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 7c6633a..0c19148 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 6aa739b..f691b11 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 74a2378..a141435 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 c7b3e4f..9296219 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 26aab66..03b078c 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 c405629..2fe5526 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 ef81f29..6621d25 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 d825257..ff137d5 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;