mirror of
https://github.com/RaySollium99/libpicofe.git
synced 2025-09-05 14:57:46 -04:00
oshide: drop termios dump/restore, OS already handles that
git-svn-id: file:///home/notaz/opt/svn/PicoDrive/platform@875 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
f6eaae4f09
commit
57e9b4d30d
2 changed files with 9 additions and 36 deletions
|
@ -15,7 +15,6 @@
|
|||
#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) { \
|
||||
|
@ -169,7 +168,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 +186,6 @@ 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 +220,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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue