summary refs log tree commit diff
path: root/sysdeps/mach/hurd/ioctl.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1996-02-16 02:19:52 +0000
committerRoland McGrath <roland@gnu.org>1996-02-16 02:19:52 +0000
commit9e3db9cd59f37a5a591ac341833508b4ba6b4f8d (patch)
tree1a9a9926dd575e3b73078873e356a958742c1f8e /sysdeps/mach/hurd/ioctl.c
parenta1c46301bb74628aba2d86340024159f6f5d344a (diff)
downloadglibc-9e3db9cd59f37a5a591ac341833508b4ba6b4f8d.tar.gz
glibc-9e3db9cd59f37a5a591ac341833508b4ba6b4f8d.tar.xz
glibc-9e3db9cd59f37a5a591ac341833508b4ba6b4f8d.zip
Thu Feb 15 13:57:08 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu> cvs/libc-960216
	* mach/Machrules: Use -include for $(*.ir).

	* hurd/hurd/ioctl.h (_HURD_HANDLE_IOCTLS): Mask off type bits in
	request values.
	* sysdeps/mach/hurd/ioctls.h (_IOC_NOTYPE): New macro.
	(_IOT_COUNT2): Field is 3 bits, not 2.
	* sysdeps/mach/hurd/ioctl.c: Ignore handler if it fails with ENOTTY.
	* hurd/hurdioctl.c (_hurd_lookup_ioctl_handler): Mask off type
	bits before looking up handler.
	(fioctl): Use __hurd_dfail.
	(fioctl, fioclex): Use ENOTTY for bogus request instead of EGRATUITOUS.

Wed Feb 14 00:21:17 1996 David Mosberger-Tang  <davidm@azstarnet.com>

	* sysdeps/alpha/memchr.c (memchr): loop searching for matching
	character bailed out one too early; changed constant 6 to
	7 to fix this.
Diffstat (limited to 'sysdeps/mach/hurd/ioctl.c')
-rw-r--r--sysdeps/mach/hurd/ioctl.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/sysdeps/mach/hurd/ioctl.c b/sysdeps/mach/hurd/ioctl.c
index acc34fa916..24bfbed943 100644
--- a/sysdeps/mach/hurd/ioctl.c
+++ b/sysdeps/mach/hurd/ioctl.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
 This file is part of the GNU C Library.
 
 The GNU C Library is free software; you can redistribute it and/or
@@ -129,8 +129,17 @@ DEFUN(__ioctl, (fd, request),
     /* Check for a registered handler for REQUEST.  */
     ioctl_handler_t handler = _hurd_lookup_ioctl_handler (request);
     if (handler)
-      /* This handler groks REQUEST.  Se lo puntamonos.  */
-      return (*handler) (fd, request, arg);
+      {
+	/* This handler groks REQUEST.  Se lo puntamonos.  */
+	int save = errno;
+	int result = (*handler) (fd, request, arg);
+	if (result != -1 || errno != ENOTTY)
+	  return result;
+
+	/* The handler doesn't really grok this one.
+	   Try the normal RPC translation.  */
+	errno = save;
+      }
   }
 
   /* Compute the Mach message ID for the RPC from the group and command