/* Optional defines */
+#ifndef MAX_VT
+#define MAX_VT 1
+#endif
+
#ifndef VT_MAP_CHAR
#define VT_MAP_CHAR(x) (x)
#endif
void scroll_down(void);
void plot_char(int8_t y, int8_t x, uint16_t c);
void do_beep(void);
+int vt_ioctl(uint8_t minor, uint16_t op, char *ptr);
#endif
\ No newline at end of file
#include <kernel.h>
+#include <tty.h>
#include <vt.h>
#include <devtty.h>
cursor_on(cursory, cursorx);
}
+int vt_ioctl(uint8_t minor, uint16_t request, char *data)
+{
+ /* FIXME: need to address the multiple vt switching case
+ here.. probably need to switch vt */
+ if (minor <= MAX_VT) {
+ switch(request) {
+ case KBMAPSIZE:
+ return KEY_ROWS << 8 | KEY_COLS;
+ case KBMAPGET:
+ return uput(keymap, data, sizeof(keymap));
+ case VTSIZE:
+ return VT_HEIGHT << 8 | VT_WIDTH;
+ }
+ }
+ return tty_ioctl(minor, request, data);
+}
+
+
void vtinit(void)
{
vtmode = 0;