aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/errno.h
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>1997-12-06 11:28:06 +0000
committerBruce Evans <bde@FreeBSD.org>1997-12-06 11:28:06 +0000
commit91241944ea1834d220751590128d8475ca1ef84f (patch)
tree890ba7647c73af6cf8373828ca3b973798240165 /sys/sys/errno.h
parent90a5affc0a7d8a9c08c6af058b88782034882365 (diff)
downloadsrc-91241944ea1834d220751590128d8475ca1ef84f.tar.gz
src-91241944ea1834d220751590128d8475ca1ef84f.zip
Added a kernel-only error code ENOICTL. This will be returned from
low level ioctl routines instead of the magic number -1 so that callers can distinguish it from ERESTART (which happens to be -1). -1 meant that the ioctl was not handled at the called level. ERESTART is normal when a sleeping ioctl is interrupted. ERESTART got converted to ENOTTY instead of restarting the ioctl. Many (most?) ioctls can not be restarted safely, but this is apparently supposed to be handled by drivers converting ERESTART to EINTR. I first saw this problem for TIOCDRAIN. Justin saw if for disk ioctls. Added missing parentheses.
Notes
Notes: svn path=/head/; revision=31575
Diffstat (limited to 'sys/sys/errno.h')
-rw-r--r--sys/sys/errno.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/sys/errno.h b/sys/sys/errno.h
index 78fb8caebaa2..3df8f96fe78e 100644
--- a/sys/sys/errno.h
+++ b/sys/sys/errno.h
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)errno.h 8.5 (Berkeley) 1/21/94
- * $Id$
+ * $Id: errno.h,v 1.7 1997/02/22 09:45:10 peter Exp $
*/
#ifndef _SYS_ERRNO_H_
@@ -170,8 +170,9 @@ extern int errno; /* global error number */
#ifdef KERNEL
/* pseudo-errors returned inside kernel to modify return to process */
-#define ERESTART -1 /* restart syscall */
-#define EJUSTRETURN -2 /* don't modify regs, just return */
+#define ERESTART (-1) /* restart syscall */
+#define EJUSTRETURN (-2) /* don't modify regs, just return */
+#define ENOIOCTL (-3) /* ioctl not handled by this layer */
#endif
#endif