diff options
author | phk <phk@FreeBSD.org> | 1999-09-25 16:21:39 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1999-09-25 16:21:39 +0000 |
commit | a2c68c62dba7acc1de5dd6a6141484d9c12844fe (patch) | |
tree | c55829a482e5222c5ae63cf589d4fd2a7ec13aec /sys/compat/linux/linux_file.c | |
parent | 869afb6bbe2f0a063d91bf2099b7121d2d03c1b2 (diff) | |
download | FreeBSD-src-a2c68c62dba7acc1de5dd6a6141484d9c12844fe.zip FreeBSD-src-a2c68c62dba7acc1de5dd6a6141484d9c12844fe.tar.gz |
This patch clears the way for removing a number of tty related
fields in struct cdevsw:
d_stop moved to struct tty.
d_reset already unused.
d_devtotty linkage now provided by dev_t->si_tty.
These fields will be removed from struct cdevsw together with
d_params and d_maxio Real Soon Now.
The changes in this patch consist of:
initialize dev->si_tty in *_open()
initialize tty->t_stop
remove devtotty functions
rename ttpoll to ttypoll
a few adjustments to these changes in the generic code
a bump of __FreeBSD_version
add a couple of FreeBSD tags
Diffstat (limited to 'sys/compat/linux/linux_file.c')
-rw-r--r-- | sys/compat/linux/linux_file.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index 6a33e68..11ea240 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -204,13 +204,12 @@ linux_fcntl(struct proc *p, struct linux_fcntl_args *args) struct vnode *vp; long pgid; struct pgrp *pgrp; - struct tty *tp, *(*d_tty) __P((dev_t)); + struct tty *tp; caddr_t sg; dev_t dev; sg = stackgap_init(); bsd_flock = (struct flock *)stackgap_alloc(&sg, sizeof(struct flock)); - d_tty = NULL; #ifdef DEBUG printf("Linux-emul(%d): fcntl(%d, %08x, *)\n", @@ -309,8 +308,10 @@ linux_fcntl(struct proc *p, struct linux_fcntl_args *args) dev = vn_todev(vp); if (vp->v_type != VCHR || dev == NODEV) return EINVAL; - d_tty = devsw(dev)->d_devtotty; - if (!d_tty || (!(tp = (*d_tty)(dev)))) + if (!(devsw(dev)->d_flags & D_TTY)) + return EINVAL; + tp = dev->si_tty; + if (!tp) return EINVAL; if (args->cmd == LINUX_F_GETOWN) { p->p_retval[0] = tp->t_pgrp ? tp->t_pgrp->pg_id : NO_PID; |