The old CAIF character device are not TTYs

This commit is contained in:
Marcel Holtmann 2010-01-28 21:34:16 +01:00
parent bc7d0fb27f
commit 2e4bcbf0ac
1 changed files with 1 additions and 10 deletions

View File

@ -28,7 +28,6 @@
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <termios.h>
#include <glib.h>
#include <glib/gprintf.h>
@ -42,22 +41,14 @@ static GMainLoop *mainloop;
static int do_open(void)
{
struct termios ti;
int fd;
fd = open("/dev/chnlat11", O_RDWR | O_NOCTTY | O_NONBLOCK);
fd = open("/dev/chnlat11", O_RDWR);
if (fd < 0) {
g_printerr("Open of chnlat11 failed (%d)\n", errno);
return -EIO;
}
/* Switch TTY to raw mode */
memset(&ti, 0, sizeof(ti));
cfmakeraw(&ti);
tcflush(fd, TCIOFLUSH);
tcsetattr(fd, TCSANOW, &ti);
return fd;
}