+/*
+ * (C) GraÅžvydas "notaz" Ignotas, 2009-2010
+ *
+ * This work is licensed under the terms of any of these licenses
+ * (at your option):
+ * - GNU GPL, version 2 or later.
+ * - GNU LGPL, version 2.1 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
#include <stdio.h>
#include <string.h>
#include <pthread.h>
#include <linux/kd.h>
#define PFX "oshide: "
-#define TERMIOS_DUMP_FILE "/tmp/pico_tios"
#define FPTR(f) typeof(f) * p##f
#define FPTR_LINK(xf, dl, f) { \
static void hidecon_start(void)
{
struct termios kbd_termios;
- FILE *tios_f;
int mode;
g_kbdfd = open("/dev/tty", O_RDWR);
goto fail;
}
- /* dump for picorestore */
g_kbd_termios_saved = kbd_termios;
- tios_f = fopen(TERMIOS_DUMP_FILE, "wb");
- if (tios_f) {
- fwrite(&kbd_termios, sizeof(kbd_termios), 1, tios_f);
- fclose(tios_f);
- }
-
kbd_termios.c_lflag &= ~(ICANON | ECHO); // | ISIG);
kbd_termios.c_iflag &= ~(ISTRIP | IGNCR | ICRNL | INLCR | IXOFF | IXON);
kbd_termios.c_cc[VMIN] = 0;
if (tcsetattr(g_kbdfd, TCSAFLUSH, &g_kbd_termios_saved) == -1)
perror(PFX "tcsetattr");
- remove(TERMIOS_DUMP_FILE);
-
close(g_kbdfd);
g_kbdfd = -1;
}