tty: reading input from a tty is now handled by the line discipline
This commit is contained in:
@@ -75,8 +75,14 @@ static void putchar(struct device *tty, int c)
|
||||
|
||||
kern_status_t tty_read(struct device *tty, void *buf, size_t max, size_t *nr_read, socks_flags_t flags)
|
||||
{
|
||||
printk("tty_read");
|
||||
return KERN_OK;
|
||||
kern_status_t status = KERN_UNSUPPORTED;
|
||||
struct tty_device *ttydev = TTY_DEVICE(tty);
|
||||
|
||||
if (ttydev->tty_ldisc || ttydev->tty_ldisc->read) {
|
||||
status = ttydev->tty_ldisc->read(tty, buf, max, nr_read, flags);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
kern_status_t tty_write(struct device *tty, const void *buf, size_t len, size_t *nr_written, socks_flags_t flags)
|
||||
|
||||
Reference in New Issue
Block a user