simplify check for device.

This commit is contained in:
Poul-Henning Kamp 1999-11-08 09:59:17 +00:00
parent 73027df75c
commit 3e30338edd
2 changed files with 2 additions and 2 deletions

View File

@ -306,7 +306,7 @@ linux_fcntl(struct proc *p, struct linux_fcntl_args *args)
}
vp = (struct vnode *)fp->f_data;
dev = vn_todev(vp);
if (vp->v_type != VCHR || dev == NODEV)
if (dev == NODEV)
return EINVAL;
if (!(devsw(dev)->d_flags & D_TTY))
return EINVAL;

View File

@ -306,7 +306,7 @@ linux_fcntl(struct proc *p, struct linux_fcntl_args *args)
}
vp = (struct vnode *)fp->f_data;
dev = vn_todev(vp);
if (vp->v_type != VCHR || dev == NODEV)
if (dev == NODEV)
return EINVAL;
if (!(devsw(dev)->d_flags & D_TTY))
return EINVAL;