[rtems commit] Import latest <sys/filio.h> from FreeBSD

Sebastian Huber sebh at rtems.org
Wed Nov 18 06:28:20 UTC 2015


Module:    rtems
Branch:    master
Commit:    836803f72ae883dbceb93c5be3e4e988646ceb42
Changeset: http://git.rtems.org/rtems/commit/?id=836803f72ae883dbceb93c5be3e4e988646ceb42

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Nov 17 14:57:47 2015 +0100

Import latest <sys/filio.h> from FreeBSD

Required by new network stack.

---

 cpukit/libcsupport/include/sys/filio.h  | 20 +++++++++++++-------
 cpukit/libcsupport/include/sys/ioccom.h | 10 ----------
 2 files changed, 13 insertions(+), 17 deletions(-)

diff --git a/cpukit/libcsupport/include/sys/filio.h b/cpukit/libcsupport/include/sys/filio.h
index f1a703a..df1b6f4 100644
--- a/cpukit/libcsupport/include/sys/filio.h
+++ b/cpukit/libcsupport/include/sys/filio.h
@@ -15,10 +15,6 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the University of
- *	California, Berkeley and its contributors.
  * 4. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
@@ -36,6 +32,7 @@
  * SUCH DAMAGE.
  *
  *	@(#)filio.h	8.1 (Berkeley) 3/28/94
+ * $FreeBSD r195191 2009-06-30T13:38:49Z$
  */
 
 #ifndef	_SYS_FILIO_H_
@@ -43,8 +40,6 @@
 
 #include <sys/ioccom.h>
 
-/* RTEMS defines all of these in sys/ioccom.h */
-#if 0
 /* Generic file-descriptor ioctl's. */
 #define	FIOCLEX		 _IO('f', 1)		/* set close on exec on fd */
 #define	FIONCLEX	 _IO('f', 2)		/* remove close on exec */
@@ -53,6 +48,17 @@
 #define	FIOASYNC	_IOW('f', 125, int)	/* set/clear async i/o */
 #define	FIOSETOWN	_IOW('f', 124, int)	/* set owner */
 #define	FIOGETOWN	_IOR('f', 123, int)	/* get owner */
-#endif
+#define	FIODTYPE	_IOR('f', 122, int)	/* get d_flags type part */
+#define	FIOGETLBA	_IOR('f', 121, int)	/* get start blk # */
+struct fiodgname_arg {
+	int	len;
+	void	*buf;
+};
+#define	FIODGNAME	_IOW('f', 120, struct fiodgname_arg) /* get dev. name */
+#define	FIONWRITE	_IOR('f', 119, int)	/* get # bytes (yet) to write */
+#define	FIONSPACE	_IOR('f', 118, int)	/* get space in send queue */
+/* Handle lseek SEEK_DATA and SEEK_HOLE for holey file knowledge. */
+#define	FIOSEEKDATA	_IOWR('f', 97, off_t)	/* SEEK_DATA */
+#define	FIOSEEKHOLE	_IOWR('f', 98, off_t)	/* SEEK_HOLE */
 
 #endif /* !_SYS_FILIO_H_ */
diff --git a/cpukit/libcsupport/include/sys/ioccom.h b/cpukit/libcsupport/include/sys/ioccom.h
index d454328..1699fc9 100644
--- a/cpukit/libcsupport/include/sys/ioccom.h
+++ b/cpukit/libcsupport/include/sys/ioccom.h
@@ -80,16 +80,6 @@ typedef uint32_t ioctl_command_t;
 #define       RTEMS_IO_SNDWAKEUP      5
 #define       RTEMS_IO_TCFLUSH        6
 
-/* copied from libnetworking/sys/filio.h and commented out there */
-/* Generic file-descriptor ioctl's. */
-#define FIOCLEX          _IO('f', 1)            /* set close on exec on fd */
-#define FIONCLEX         _IO('f', 2)            /* remove close on exec */
-#define FIONREAD        _IOR('f', 127, int)     /* get # bytes to read */
-#define FIONBIO         _IOW('f', 126, int)     /* set/clear non-blocking i/o */
-#define FIOASYNC        _IOW('f', 125, int)     /* set/clear async i/o */
-#define FIOSETOWN       _IOW('f', 124, int)     /* set owner */
-#define FIOGETOWN       _IOR('f', 123, int)     /* get owner */
-
 #ifdef _KERNEL
 
 #if defined(COMPAT_FREEBSD6) || defined(COMPAT_FREEBSD5) || \



More information about the vc mailing list