summaryrefslogtreecommitdiff
path: root/include/linux/kd.h
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-03-18 21:53:30 -0400
committerRich Felker <dalias@aerifal.cx>2011-03-18 21:53:30 -0400
commit56fd65e861e0ad0ea7677211f8258a8f64233f26 (patch)
tree292993817bf9d287caf8f51d5691964fb92c2bab /include/linux/kd.h
parentf5ba2bc9ca84d67f03f2542bfff0525f2f478e4c (diff)
downloadmusl-56fd65e861e0ad0ea7677211f8258a8f64233f26.tar.gz
some linux headers useful from user apps.
i'm still not sure whether it's a good idea to include or use any of these, but i'll add them for now. it may make more sense to just add official kernel headers to the include path for compiling programs that need them.
Diffstat (limited to 'include/linux/kd.h')
-rw-r--r--include/linux/kd.h157
1 files changed, 157 insertions, 0 deletions
diff --git a/include/linux/kd.h b/include/linux/kd.h
new file mode 100644
index 00000000..34e7491a
--- /dev/null
+++ b/include/linux/kd.h
@@ -0,0 +1,157 @@
+#ifndef _LINUX_KD_H
+#define _LINUX_KD_H
+
+#define GIO_FONT 0x4B60
+#define PIO_FONT 0x4B61
+#define GIO_FONTX 0x4B6B
+#define PIO_FONTX 0x4B6C
+
+struct consolefontdesc {
+ unsigned short charcount;
+ unsigned short charheight;
+ char *chardata;
+};
+
+#define PIO_FONTRESET 0x4B6D
+
+#define GIO_CMAP 0x4B70
+#define PIO_CMAP 0x4B71
+
+#define KIOCSOUND 0x4B2F
+#define KDMKTONE 0x4B30
+
+#define KDGETLED 0x4B31
+#define KDSETLED 0x4B32
+#define LED_SCR 0x01
+#define LED_NUM 0x02
+#define LED_CAP 0x04
+
+#define KDGKBTYPE 0x4B33
+#define KB_84 0x01
+#define KB_101 0x02
+#define KB_OTHER 0x03
+
+#define KDADDIO 0x4B34
+#define KDDELIO 0x4B35
+#define KDENABIO 0x4B36
+#define KDDISABIO 0x4B37
+
+#define KDSETMODE 0x4B3A
+#define KD_TEXT 0x00
+#define KD_GRAPHICS 0x01
+#define KD_TEXT0 0x02
+#define KD_TEXT1 0x03
+#define KDGETMODE 0x4B3B
+
+#define KDMAPDISP 0x4B3C
+#define KDUNMAPDISP 0x4B3D
+
+typedef char scrnmap_t;
+#define E_TABSZ 256
+#define GIO_SCRNMAP 0x4B40
+#define PIO_SCRNMAP 0x4B41
+#define GIO_UNISCRNMAP 0x4B69
+#define PIO_UNISCRNMAP 0x4B6A
+
+#define GIO_UNIMAP 0x4B66
+struct unipair {
+ unsigned short unicode;
+ unsigned short fontpos;
+};
+struct unimapdesc {
+ unsigned short entry_ct;
+ struct unipair *entries;
+};
+
+#define PIO_UNIMAP 0x4B67
+#define PIO_UNIMAPCLR 0x4B68
+
+struct unimapinit {
+ unsigned short advised_hashsize;
+ unsigned short advised_hashstep;
+ unsigned short advised_hashlevel;
+};
+
+#define UNI_DIRECT_BASE 0xF000
+#define UNI_DIRECT_MASK 0x01FF
+
+#define K_RAW 0x00
+#define K_XLATE 0x01
+#define K_MEDIUMRAW 0x02
+#define K_UNICODE 0x03
+#define KDGKBMODE 0x4B44
+#define KDSKBMODE 0x4B45
+
+#define K_METABIT 0x03
+#define K_ESCPREFIX 0x04
+#define KDGKBMETA 0x4B62
+#define KDSKBMETA 0x4B63
+
+#define K_SCROLLLOCK 0x01
+#define K_NUMLOCK 0x02
+#define K_CAPSLOCK 0x04
+#define KDGKBLED 0x4B64
+#define KDSKBLED 0x4B65
+
+struct kbentry {
+ unsigned char kb_table;
+ unsigned char kb_index;
+ unsigned short kb_value;
+};
+#define K_NORMTAB 0x00
+#define K_SHIFTTAB 0x01
+#define K_ALTTAB 0x02
+#define K_ALTSHIFTTAB 0x03
+
+#define KDGKBENT 0x4B46
+#define KDSKBENT 0x4B47
+
+struct kbsentry {
+ unsigned char kb_func;
+ unsigned char kb_string[512];
+};
+#define KDGKBSENT 0x4B48
+#define KDSKBSENT 0x4B49
+
+struct kbdiacr {
+ unsigned char diacr, base, result;
+};
+struct kbdiacrs {
+ unsigned int kb_cnt;
+ struct kbdiacr kbdiacr[256];
+};
+#define KDGKBDIACR 0x4B4A
+#define KDSKBDIACR 0x4B4B
+
+struct kbkeycode {
+ unsigned int scancode, keycode;
+};
+#define KDGETKEYCODE 0x4B4C
+#define KDSETKEYCODE 0x4B4D
+
+#define KDSIGACCEPT 0x4B4E
+
+struct kbd_repeat {
+ int delay;
+ int rate;
+};
+
+#define KDKBDREP 0x4B52
+#define KDFONTOP 0x4B72
+
+struct console_font_op {
+ unsigned int op;
+ unsigned int flags;
+ unsigned int width, height;
+ unsigned int charcount;
+ unsigned char *data;
+};
+
+#define KD_FONT_OP_SET 0
+#define KD_FONT_OP_GET 1
+#define KD_FONT_OP_SET_DEFAULT 2
+#define KD_FONT_OP_COPY 3
+
+#define KD_FONT_FLAG_DONT_RECALC 1
+
+#endif