Comments updated
This commit is contained in:
+7
-9
@@ -64,8 +64,8 @@ typedef struct {
|
||||
struct fuse_pollhandle *ph;
|
||||
|
||||
volatile int rel_pending;
|
||||
volatile int slave_suspended; /*waiting for application to read data */
|
||||
volatile int master_suspended; /*server is not ready to receive data */
|
||||
volatile int slave_suspended; /* Waiting for application to read data */
|
||||
volatile int master_suspended; /* Server is not ready to receive data */
|
||||
struct pollfd fds[3];
|
||||
|
||||
char net_buf[NET_BUF_SIZE];
|
||||
@@ -127,7 +127,6 @@ static void ttynvt_interrupted(fuse_req_t req, void *data)
|
||||
pthread_kill(thread, SIGUSR2);
|
||||
}
|
||||
|
||||
|
||||
static void _ttynvt_sleep_us(unsigned int tus)
|
||||
{
|
||||
struct timespec ts;
|
||||
@@ -156,7 +155,6 @@ static int _check_dev(void)
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
static void _fd_close(int fd)
|
||||
{
|
||||
if (fd >= 0)
|
||||
@@ -473,7 +471,7 @@ static void ttynvt_open(fuse_req_t req, struct fuse_file_info *info)
|
||||
tty->fds[FD_NET].events = POLLIN;
|
||||
tty->net_cnt = 0;
|
||||
|
||||
if ((fd = open("/dev/ptmx", O_RDWR)) < 0) /* open master */
|
||||
if ((fd = open("/dev/ptmx", O_RDWR)) < 0) /* Open master */
|
||||
goto open_err;
|
||||
|
||||
tty->fds[FD_MASTER].fd = fd;
|
||||
@@ -491,11 +489,11 @@ static void ttynvt_open(fuse_req_t req, struct fuse_file_info *info)
|
||||
if (ioctl(fd, TCSETS, &ios) < 0)
|
||||
goto open_err;
|
||||
|
||||
grantpt(fd); /* change permission of slave */
|
||||
unlockpt(fd); /* unlock slave */
|
||||
slave_name = ptsname(fd); /* get name of slave */
|
||||
grantpt(fd); /* Change permission of slave */
|
||||
unlockpt(fd); /* Unlock slave */
|
||||
slave_name = ptsname(fd); /* Get name of slave */
|
||||
|
||||
if ((fd = open(slave_name, O_RDWR | O_NOCTTY)) < 0) /* open slave */
|
||||
if ((fd = open(slave_name, O_RDWR | O_NOCTTY)) < 0) /* Open slave */
|
||||
goto open_err;
|
||||
|
||||
ioctl(fd, TCGETS, &tty->tio);
|
||||
|
||||
Reference in New Issue
Block a user