X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=linux%2Foshide.c;h=484618d8987639849903afe212f7848d04b14ec0;hb=392b07b2bc6b42990755c13af50dde3e749d3b62;hp=e66aaaee90462ad3001e33e65b1f05d23d87a7f4;hpb=f6eaae4f09c6abab99692900a31c1df2a06b99af;p=libpicofe.git diff --git a/linux/oshide.c b/linux/oshide.c index e66aaae..484618d 100644 --- a/linux/oshide.c +++ b/linux/oshide.c @@ -1,3 +1,10 @@ +/* + * (C) Gražvydas "notaz" Ignotas, 2009-2010 + * + * This work is licensed under the terms of the GNU LGPL, version 2.1 or later. + * See the COPYING file in the top-level directory. + */ + #include #include #include @@ -15,7 +22,6 @@ #include #define PFX "oshide: " -#define TERMIOS_DUMP_FILE "/tmp/pico_tios" #define FPTR(f) typeof(f) * p##f #define FPTR_LINK(xf, dl, f) { \ @@ -169,7 +175,6 @@ static int g_kbdfd; static void hidecon_start(void) { struct termios kbd_termios; - FILE *tios_f; int mode; g_kbdfd = open("/dev/tty", O_RDWR); @@ -188,14 +193,7 @@ static void hidecon_start(void) 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; @@ -230,8 +228,6 @@ static void hidecon_end(void) if (tcsetattr(g_kbdfd, TCSAFLUSH, &g_kbd_termios_saved) == -1) perror(PFX "tcsetattr"); - remove(TERMIOS_DUMP_FILE); - close(g_kbdfd); g_kbdfd = -1; }