diff options
author | Eric Andersen <andersen@codepoet.org> | 2000-07-08 18:55:24 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2000-07-08 18:55:24 +0000 |
commit | bd22ed806782eec76929bcd2ec556717e79d24c7 (patch) | |
tree | e225367aaef198eacec8ed0b530d36a9d888d92f /console-tools | |
parent | 877a71bbf0b8386add4631c08f7101259ad2dc07 (diff) | |
download | busybox-w32-bd22ed806782eec76929bcd2ec556717e79d24c7.tar.gz busybox-w32-bd22ed806782eec76929bcd2ec556717e79d24c7.tar.bz2 busybox-w32-bd22ed806782eec76929bcd2ec556717e79d24c7.zip |
Update files to reduce dependance on kernel version...
-Erik
Diffstat (limited to 'console-tools')
-rw-r--r-- | console-tools/chvt.c | 10 | ||||
-rw-r--r-- | console-tools/deallocvt.c | 7 | ||||
-rw-r--r-- | console-tools/loadkmap.c | 14 | ||||
-rw-r--r-- | console-tools/setkeycodes.c | 9 |
4 files changed, 32 insertions, 8 deletions
diff --git a/console-tools/chvt.c b/console-tools/chvt.c index 45a04397a..c5c86b613 100644 --- a/console-tools/chvt.c +++ b/console-tools/chvt.c | |||
@@ -5,12 +5,16 @@ | |||
5 | * busyboxed by Erik Andersen | 5 | * busyboxed by Erik Andersen |
6 | */ | 6 | */ |
7 | #include "internal.h" | 7 | #include "internal.h" |
8 | #include <sys/types.h> | ||
9 | #include <sys/ioctl.h> | ||
10 | #include <linux/vt.h> | ||
11 | #include <stdio.h> | 8 | #include <stdio.h> |
12 | #include <stdlib.h> | 9 | #include <stdlib.h> |
13 | #include <fcntl.h> | 10 | #include <fcntl.h> |
11 | #include <sys/types.h> | ||
12 | #include <sys/ioctl.h> | ||
13 | |||
14 | /* From <linux/vt.h> */ | ||
15 | #define VT_ACTIVATE 0x5606 /* make vt active */ | ||
16 | #define VT_WAITACTIVE 0x5607 /* wait for vt active */ | ||
17 | |||
14 | 18 | ||
15 | int chvt_main(int argc, char **argv) | 19 | int chvt_main(int argc, char **argv) |
16 | { | 20 | { |
diff --git a/console-tools/deallocvt.c b/console-tools/deallocvt.c index b65f7b098..0cad7717b 100644 --- a/console-tools/deallocvt.c +++ b/console-tools/deallocvt.c | |||
@@ -5,11 +5,14 @@ | |||
5 | */ | 5 | */ |
6 | #include "internal.h" | 6 | #include "internal.h" |
7 | #include <stdlib.h> | 7 | #include <stdlib.h> |
8 | #include <stdio.h> | ||
8 | #include <fcntl.h> | 9 | #include <fcntl.h> |
9 | #include <sys/types.h> | 10 | #include <sys/types.h> |
10 | #include <sys/ioctl.h> | 11 | #include <sys/ioctl.h> |
11 | #include <linux/vt.h> | 12 | |
12 | #include <stdio.h> | 13 | /* From <linux/vt.h> */ |
14 | #define VT_DISALLOCATE 0x5608 /* free memory associated to vt */ | ||
15 | |||
13 | 16 | ||
14 | char *progname; | 17 | char *progname; |
15 | 18 | ||
diff --git a/console-tools/loadkmap.c b/console-tools/loadkmap.c index 905741467..0e8c090d2 100644 --- a/console-tools/loadkmap.c +++ b/console-tools/loadkmap.c | |||
@@ -24,10 +24,20 @@ | |||
24 | #include <errno.h> | 24 | #include <errno.h> |
25 | #include <fcntl.h> | 25 | #include <fcntl.h> |
26 | #include <stdio.h> | 26 | #include <stdio.h> |
27 | #include <linux/kd.h> | ||
28 | #include <linux/keyboard.h> | ||
29 | #include <sys/ioctl.h> | 27 | #include <sys/ioctl.h> |
30 | 28 | ||
29 | /* From <linux/kd.h> */ | ||
30 | struct kbentry { | ||
31 | unsigned char kb_table; | ||
32 | unsigned char kb_index; | ||
33 | unsigned short kb_value; | ||
34 | }; | ||
35 | #define KDSKBENT 0x4B47 /* sets one entry in translation table */ | ||
36 | |||
37 | /* From <linux/keyboard.h> */ | ||
38 | #define NR_KEYS 128 | ||
39 | #define MAX_NR_KEYMAPS 256 | ||
40 | |||
31 | 41 | ||
32 | static const char loadkmap_usage[] = "loadkmap\n" | 42 | static const char loadkmap_usage[] = "loadkmap\n" |
33 | #ifndef BB_FEATURE_TRIVIAL_HELP | 43 | #ifndef BB_FEATURE_TRIVIAL_HELP |
diff --git a/console-tools/setkeycodes.c b/console-tools/setkeycodes.c index 9062caf75..1bdb909ea 100644 --- a/console-tools/setkeycodes.c +++ b/console-tools/setkeycodes.c | |||
@@ -27,7 +27,14 @@ | |||
27 | #include <stdlib.h> | 27 | #include <stdlib.h> |
28 | #include <fcntl.h> | 28 | #include <fcntl.h> |
29 | #include <sys/ioctl.h> | 29 | #include <sys/ioctl.h> |
30 | #include <linux/kd.h> | 30 | |
31 | |||
32 | /* From <linux/kd.h> */ | ||
33 | struct kbkeycode { | ||
34 | unsigned int scancode, keycode; | ||
35 | }; | ||
36 | #define KDSETKEYCODE 0x4B4D /* write kernel keycode table entry */ | ||
37 | |||
31 | 38 | ||
32 | static const char setkeycodes_usage[] = | 39 | static const char setkeycodes_usage[] = |
33 | "setkeycodes SCANCODE KEYCODE ...\n" | 40 | "setkeycodes SCANCODE KEYCODE ...\n" |