mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
If a vnode has no v_rdev we cannot hope to answer FIODTYPE ioctl.
This commit is contained in:
parent
205eb0cd5e
commit
90a660e199
1 changed files with 2 additions and 0 deletions
|
|
@ -806,6 +806,8 @@ vn_ioctl(fp, com, data, active_cred, td)
|
|||
case VCHR:
|
||||
case VBLK:
|
||||
if (com == FIODTYPE) {
|
||||
if (vp->v_rdev == NULL)
|
||||
return (EOPNOTSUPP);
|
||||
if (vp->v_type != VCHR && vp->v_type != VBLK)
|
||||
return (ENOTTY);
|
||||
*(int *)data = devsw(vp->v_rdev)->d_flags & D_TYPEMASK;
|
||||
|
|
|
|||
Loading…
Reference in a new issue