diff options
author | bde <bde@FreeBSD.org> | 1997-12-06 11:28:06 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1997-12-06 11:28:06 +0000 |
commit | 1a4a2c1dd5e2c7ba97a31d9225a7c24275650402 (patch) | |
tree | 827b0165a46a0dd881c5f312618f13ebf0ec4347 /sys/sys/errno.h | |
parent | 9c69c6726f3deaf275801170868a146c8ec079ed (diff) | |
download | FreeBSD-src-1a4a2c1dd5e2c7ba97a31d9225a7c24275650402.zip FreeBSD-src-1a4a2c1dd5e2c7ba97a31d9225a7c24275650402.tar.gz |
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.
Diffstat (limited to 'sys/sys/errno.h')
-rw-r--r-- | sys/sys/errno.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/sys/errno.h b/sys/sys/errno.h index 78fb8ca..3df8f96 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 |