summaryrefslogtreecommitdiff
path: root/console-tools
diff options
context:
space:
mode:
Diffstat (limited to 'console-tools')
-rw-r--r--console-tools/chvt.c10
-rw-r--r--console-tools/deallocvt.c7
-rw-r--r--console-tools/loadkmap.c14
-rw-r--r--console-tools/setkeycodes.c9
4 files changed, 32 insertions, 8 deletions
diff --git a/console-tools/chvt.c b/console-tools/chvt.c
index 45a0439..c5c86b6 100644
--- a/console-tools/chvt.c
+++ b/console-tools/chvt.c
@@ -5,12 +5,16 @@
* busyboxed by Erik Andersen
*/
#include "internal.h"
-#include <sys/types.h>
-#include <sys/ioctl.h>
-#include <linux/vt.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/ioctl.h>
+
+/* From <linux/vt.h> */
+#define VT_ACTIVATE 0x5606 /* make vt active */
+#define VT_WAITACTIVE 0x5607 /* wait for vt active */
+
int chvt_main(int argc, char **argv)
{
diff --git a/console-tools/deallocvt.c b/console-tools/deallocvt.c
index b65f7b0..0cad771 100644
--- a/console-tools/deallocvt.c
+++ b/console-tools/deallocvt.c
@@ -5,11 +5,14 @@
*/
#include "internal.h"
#include <stdlib.h>
+#include <stdio.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/ioctl.h>
-#include <linux/vt.h>
-#include <stdio.h>
+
+/* From <linux/vt.h> */
+#define VT_DISALLOCATE 0x5608 /* free memory associated to vt */
+
char *progname;
diff --git a/console-tools/loadkmap.c b/console-tools/loadkmap.c
index 9057414..0e8c090 100644
--- a/console-tools/loadkmap.c
+++ b/console-tools/loadkmap.c
@@ -24,10 +24,20 @@
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
-#include <linux/kd.h>
-#include <linux/keyboard.h>
#include <sys/ioctl.h>
+/* From <linux/kd.h> */
+struct kbentry {
+ unsigned char kb_table;
+ unsigned char kb_index;
+ unsigned short kb_value;
+};
+#define KDSKBENT 0x4B47 /* sets one entry in translation table */
+
+/* From <linux/keyboard.h> */
+#define NR_KEYS 128
+#define MAX_NR_KEYMAPS 256
+
static const char loadkmap_usage[] = "loadkmap\n"
#ifndef BB_FEATURE_TRIVIAL_HELP
diff --git a/console-tools/setkeycodes.c b/console-tools/setkeycodes.c
index 9062caf..1bdb909 100644
--- a/console-tools/setkeycodes.c
+++ b/console-tools/setkeycodes.c
@@ -27,7 +27,14 @@
#include <stdlib.h>
#include <fcntl.h>
#include <sys/ioctl.h>
-#include <linux/kd.h>
+
+
+/* From <linux/kd.h> */
+struct kbkeycode {
+ unsigned int scancode, keycode;
+};
+#define KDSETKEYCODE 0x4B4D /* write kernel keycode table entry */
+
static const char setkeycodes_usage[] =
"setkeycodes SCANCODE KEYCODE ...\n"