Esempio n. 1
0
extern int read_from_oam_pty(char *str,int length)
{
	int slave_fd = 0;
	int num_read = 0;
	slave_fd = pty_slave_fd_get();
	num_read = pty_read(slave_fd, str, length);
	return num_read;
}
Esempio n. 2
0
extern int read_from_console(char *str,int length)
{
	int master_fd = 0;
	int num_read = 0;
	master_fd = pty_master_fd_get();
	num_read = pty_read(master_fd, str, length);
	return num_read;
}
Esempio n. 3
0
static ssize_t __pty_rw(int rw, struct file *file, off_t off, uint8_t *buf, size_t len)
{
	if(rw == READ)
		return pty_read(file, buf, len);
	else if(rw == WRITE)
		return pty_write(file, buf, len);
	return -EIO;
}