static struct tty_struct *ptm_unix98_lookup(struct tty_driver *driver, struct inode *ptm_inode, int idx) { struct tty_struct *tty = devpts_get_tty(ptm_inode, idx); if (tty) tty = tty->link; return tty; }
static struct tty_struct *pts_unix98_lookup(struct tty_driver *driver, struct inode *pts_inode, int idx) { struct tty_struct *tty = devpts_get_tty(pts_inode, idx); /* Master must be open before slave */ if (!tty) return ERR_PTR(-EIO); return tty; }