diff options
author | Poul-Henning Kamp <phk@FreeBSD.org> | 2002-09-26 21:21:13 +0000 |
---|---|---|
committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2002-09-26 21:21:13 +0000 |
commit | 3c275c19c40b005e7e93b4c4e18544f3b6a5406e (patch) | |
tree | 40b92b3ed520afee1be262acc88bb4d86f93de6b | |
parent | 203639c449d1bf721eebfc6f054d5198b014ce4a (diff) | |
download | src-3c275c19c40b005e7e93b4c4e18544f3b6a5406e.tar.gz src-3c275c19c40b005e7e93b4c4e18544f3b6a5406e.zip |
Under DIAGNOSTIC, complain if ENOIOCTL leaks out through VOP_IOCTL().
Notes
Notes:
svn path=/head/; revision=104017
-rw-r--r-- | sys/kern/vfs_vnops.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 8288b859ed14..1fb416b11fcb 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -773,6 +773,12 @@ vn_ioctl(fp, com, data, active_cred, td) return (0); } error = VOP_IOCTL(vp, com, data, fp->f_flag, active_cred, td); + if (error == ENOIOCTL) { +#ifdef DIAGNOSTIC + Debugger("ENOIOCTL leaked through"); +#endif + error = ENOTTY; + } if (error == 0 && com == TIOCSCTTY) { /* Do nothing if reassigning same control tty */ |