/* Interface to Nautilus screen and keyboard */ #include #include #include #include #include #include #include #include "palacios.h" /* This is a gruesome hack to allow the VM designated by the host as "the_vm" to do I/O to the standard VGA text mode console */ extern void *the_vm; static void * palacios_tty_open(void * private_data, unsigned int width, unsigned int height) { if (width!=80 || height!=25) { ERROR("Console is wrong size\n"); return 0; } INFO("Console connected\n"); return (void*)1; } static int palacios_tty_cursor_set(void * console, int x, int y) { if (console) { term_setpos(x,y); return 0; } else { return -1; } } static int palacios_tty_character_set(void * console, int x, int y, char c, unsigned char style) { if (console) { term_putc(c,style,x,y); return 0; } else { return -1; } } static int palacios_tty_scroll(void * console, int lines) { if (console) { int i; for (i=0;i