svn commit: r196884 - head/sys/sys

Ed Schouten ed at FreeBSD.org
Sun Sep 6 09:39:41 UTC 2009


Author: ed
Date: Sun Sep  6 09:39:40 2009
New Revision: 196884
URL: http://svn.freebsd.org/changeset/base/196884

Log:
  Perform cleanups to the TTY headers:
  
  - Properly sort the ioctls in ioctl_compat.h. Also perform some
    whitespace fixes.
  - Properly comment all the unused/compat ioctls in ttycom.h.

Modified:
  head/sys/sys/ioctl_compat.h
  head/sys/sys/ttycom.h

Modified: head/sys/sys/ioctl_compat.h
==============================================================================
--- head/sys/sys/ioctl_compat.h	Sun Sep  6 07:32:16 2009	(r196883)
+++ head/sys/sys/ioctl_compat.h	Sun Sep  6 09:39:40 2009	(r196884)
@@ -73,12 +73,12 @@ struct sgttyb {
 
 #define	OTIOCGETD	_IOR('t', 0, int)	/* get line discipline */
 #define	OTIOCSETD	_IOW('t', 1, int)	/* set line discipline */
-#define	TIOCHPCL	_IO('t', 2)		/* hang up on last close */
-#define	TIOCGETP	_IOR('t', 8,struct sgttyb)/* get parameters -- gtty */
-#define	TIOCSETP	_IOW('t', 9,struct sgttyb)/* set parameters -- stty */
-#define	TIOCSETN	_IOW('t',10,struct sgttyb)/* as above, but no flushtty*/
-#define	TIOCSETC	_IOW('t',17,struct tchars)/* set special characters */
-#define	TIOCGETC	_IOR('t',18,struct tchars)/* get special characters */
+#define	TIOCHPCL	 _IO('t', 2)		/* hang up on last close */
+#define	TIOCGETP	_IOR('t', 8, struct sgttyb) /* get parameters */
+#define	TIOCSETP	_IOW('t', 9, struct sgttyb) /* set parameters */
+#define	TIOCSETN	_IOW('t',10, struct sgttyb) /* as above, but no flush */
+#define	TIOCSETC	_IOW('t',17, struct tchars) /* set special characters */
+#define	TIOCGETC	_IOR('t',18, struct tchars) /* get special characters */
 #define		TANDEM		0x00000001	/* send stopc on out q full */
 #define		CBREAK		0x00000002	/* half-cooked mode */
 #define		LCASE		0x00000004	/* simulate lower case */
@@ -126,9 +126,9 @@ struct sgttyb {
 #define		PENDIN		0x20000000	/* tp->t_rawq needs reread */
 #define		DECCTQ		0x40000000	/* only ^Q starts after ^S */
 #define		NOFLSH		0x80000000	/* no output flush on signal */
-#define	TIOCLBIS	_IOW('t', 127, int)	/* bis local mode bits */
-#define	TIOCLBIC	_IOW('t', 126, int)	/* bic local mode bits */
-#define	TIOCLSET	_IOW('t', 125, int)	/* set entire local mode word */
+#define	OTIOCCONS	 _IO('t', 98)	/* for hp300 -- sans int arg */
+#define	TIOCGLTC	_IOR('t', 116,struct ltchars) /* get special chars */
+#define	TIOCSLTC	_IOW('t', 117,struct ltchars) /* set special chars */
 #define	TIOCLGET	_IOR('t', 124, int)	/* get local modes */
 #define		LCRTBS		(CRTBS>>16)
 #define		LPRTERA		(PRTERA>>16)
@@ -145,8 +145,8 @@ struct sgttyb {
 #define		LPENDIN		(PENDIN>>16)
 #define		LDECCTQ		(DECCTQ>>16)
 #define		LNOFLSH		(NOFLSH>>16)
-#define	TIOCSLTC	_IOW('t',117,struct ltchars)/* set local special chars*/
-#define	TIOCGLTC	_IOR('t',116,struct ltchars)/* get local special chars*/
-#define OTIOCCONS	_IO('t', 98)	/* for hp300 -- sans int arg */
+#define	TIOCLSET	_IOW('t', 125, int)	/* set entire local mode word */
+#define	TIOCLBIC	_IOW('t', 126, int)	/* bic local mode bits */
+#define	TIOCLBIS	_IOW('t', 127, int)	/* bis local mode bits */
 
 #endif /* !_SYS_IOCTL_COMPAT_H_ */

Modified: head/sys/sys/ttycom.h
==============================================================================
--- head/sys/sys/ttycom.h	Sun Sep  6 07:32:16 2009	(r196883)
+++ head/sys/sys/ttycom.h	Sun Sep  6 09:39:40 2009	(r196884)
@@ -57,10 +57,9 @@ struct winsize {
 };
 
 						/* 0-2 compat */
-						/* 3-4 obsolete */
-						/* 5-7 obsolete or unused */
+						/* 3-7 unused */
 						/* 8-10 compat */
-						/* 11-12 obsolete or unused */
+						/* 11-12 unused */
 #define	TIOCEXCL	 _IO('t', 13)		/* set exclusive use of tty */
 #define	TIOCNXCL	 _IO('t', 14)		/* reset exclusive use of tty */
 #define	TIOCGPTN	_IOR('t', 15, int)	/* Get pts number. */
@@ -70,34 +69,34 @@ struct winsize {
 #define	TIOCSETA	_IOW('t', 20, struct termios) /* set termios struct */
 #define	TIOCSETAW	_IOW('t', 21, struct termios) /* drain output, set */
 #define	TIOCSETAF	_IOW('t', 22, struct termios) /* drn out, fls in, set */
-						/* 23-25 obsolete or unused */
+						/* 23-25 unused */
 #define	TIOCGETD	_IOR('t', 26, int)	/* get line discipline */
 #define	TIOCSETD	_IOW('t', 27, int)	/* set line discipline */
 #define	TIOCPTMASTER	 _IO('t', 28)		/* pts master validation */
-						/* 29-69 free */
-						/* 80-84 slip */
+						/* 29-85 unused */
 #define	TIOCGDRAINWAIT	_IOR('t', 86, int)	/* get ttywait timeout */
 #define	TIOCSDRAINWAIT	_IOW('t', 87, int)	/* set ttywait timeout */
-						/* 88 slip, ppp; conflicts */
+						/* 88 unused */
+						/* 89-91 conflicts: tun and tap */
 #define	TIOCTIMESTAMP	_IOR('t', 89, struct timeval)	/* enable/get timestamp
 						 * of last input event */
-						/* 70-90 ppp; many conflicts */
 #define	TIOCMGDTRWAIT	_IOR('t', 90, int)	/* modem: get wait on close */
 #define	TIOCMSDTRWAIT	_IOW('t', 91, int)	/* modem: set wait on close */
-						/* 90-92 tap; some conflicts */
+						/* 92-93 tun and tap */
+						/* 94-97 conflicts: tun and tap */
 #define	TIOCDRAIN	 _IO('t', 94)		/* wait till output drained */
 #define	TIOCSIG		_IOWINT('t', 95)	/* pty: generate signal */
 #define	TIOCEXT		_IOW('t', 96, int)	/* pty: external processing */
-						/* 90-97 tun; some conflicts */
 #define	TIOCSCTTY	 _IO('t', 97)		/* become controlling tty */
 #define	TIOCCONS	_IOW('t', 98, int)	/* become virtual console */
 #define	TIOCGSID	_IOR('t', 99, int)	/* get session id */
-						/* 100 see consio.h */
+						/* 100 unused */
 #define	TIOCSTAT	 _IO('t', 101)		/* simulate ^T status message */
 #define	TIOCUCNTL	_IOW('t', 102, int)	/* pty: set/clr usr cntl mode */
 #define		UIOCCMD(n)	_IO('u', n)	/* usr cntl op "n" */
 #define	TIOCSWINSZ	_IOW('t', 103, struct winsize)	/* set window size */
 #define	TIOCGWINSZ	_IOR('t', 104, struct winsize)	/* get window size */
+						/* 105 unused */
 #define	TIOCMGET	_IOR('t', 106, int)	/* get all modem bits */
 #define		TIOCM_LE	0001		/* line enable */
 #define		TIOCM_DTR	0002		/* data terminal ready */


More information about the svn-src-head mailing list