simplify check for device.
This commit is contained in:
parent
73027df75c
commit
3e30338edd
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user