From ccb0271ad3aa1952c050d653062c923d971d6778 Mon Sep 17 00:00:00 2001 From: phk Date: Thu, 26 Sep 2002 21:21:13 +0000 Subject: Under DIAGNOSTIC, complain if ENOIOCTL leaks out through VOP_IOCTL(). --- sys/kern/vfs_vnops.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sys/kern') diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 8288b85..1fb416b 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 */ -- cgit v1.1