svn commit: r191919 - in head/sys: compat/svr4 conf i386/ibcs2 modules/svr4 sys

Ed Schouten ed at FreeBSD.org
Fri May 8 20:06:38 UTC 2009


Author: ed
Date: Fri May  8 20:06:37 2009
New Revision: 191919
URL: http://svn.freebsd.org/changeset/base/191919

Log:
  Burn TTY ioctl bridges in compat layers.
  
  I really don't want any pieces of code to include ioctl_compat.h, so let
  the ibcs2 and svr4 compat leave sgtty alone. If they want to support
  sgtty, they should emulate it on top of termios, not sgtty.
  
  The code has been marked with BURN_BRIDGES for a long time. ibcs2 and
  svr4 are not really popular pieces of code anyway.

Deleted:
  head/sys/compat/svr4/svr4_ttold.c
  head/sys/compat/svr4/svr4_ttold.h
Modified:
  head/sys/compat/svr4/svr4_ioctl.c
  head/sys/compat/svr4/svr4_ioctl.h
  head/sys/conf/files.i386
  head/sys/conf/files.pc98
  head/sys/i386/ibcs2/ibcs2_ioctl.c
  head/sys/i386/ibcs2/syscalls.master
  head/sys/modules/svr4/Makefile
  head/sys/sys/ioctl_compat.h

Modified: head/sys/compat/svr4/svr4_ioctl.c
==============================================================================
--- head/sys/compat/svr4/svr4_ioctl.c	Fri May  8 15:14:52 2009	(r191918)
+++ head/sys/compat/svr4/svr4_ioctl.c	Fri May  8 20:06:37 2009	(r191919)
@@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$");
 #include <compat/svr4/svr4_stropts.h>
 #include <compat/svr4/svr4_ioctl.h>
 #include <compat/svr4/svr4_termios.h>
-#include <compat/svr4/svr4_ttold.h>
 #include <compat/svr4/svr4_filio.h>
 #include <compat/svr4/svr4_sockio.h>
 
@@ -119,13 +118,6 @@ svr4_sys_ioctl(td, uap)
 #endif
 
 	switch (cmd & 0xff00) {
-#ifndef BURN_BRIDGES
-	case SVR4_tIOC:
-	        DPRINTF(("ttold\n"));
-		fun = svr4_ttold_ioctl;
-		break;
-#endif
-
 	case SVR4_TIOC:
 	        DPRINTF(("term\n"));
 		fun = svr4_term_ioctl;

Modified: head/sys/compat/svr4/svr4_ioctl.h
==============================================================================
--- head/sys/compat/svr4/svr4_ioctl.h	Fri May  8 15:14:52 2009	(r191918)
+++ head/sys/compat/svr4/svr4_ioctl.h	Fri May  8 20:06:37 2009	(r191919)
@@ -52,8 +52,6 @@ int	svr4_stream_ioctl(struct file *, str
 				  int, u_long, caddr_t);
 int	svr4_term_ioctl(struct file *, struct thread *, register_t *,
 				  int, u_long, caddr_t);
-int	svr4_ttold_ioctl(struct file *, struct thread *, register_t *,
-				  int, u_long, caddr_t);
 int	svr4_fil_ioctl	(struct file *, struct thread *, register_t *,
 				  int, u_long, caddr_t);
 int	svr4_sock_ioctl	(struct file *, struct thread *, register_t *,

Modified: head/sys/conf/files.i386
==============================================================================
--- head/sys/conf/files.i386	Fri May  8 15:14:52 2009	(r191918)
+++ head/sys/conf/files.i386	Fri May  8 20:06:37 2009	(r191919)
@@ -108,7 +108,6 @@ compat/svr4/svr4_syscallnames.c	optional
 compat/svr4/svr4_sysent.c	optional compat_svr4
 compat/svr4/svr4_sysvec.c	optional compat_svr4
 compat/svr4/svr4_termios.c	optional compat_svr4
-compat/svr4/svr4_ttold.c	optional compat_svr4
 bf_enc.o			optional crypto | ipsec	\
 	dependency	"$S/crypto/blowfish/arch/i386/bf_enc.S $S/crypto/blowfish/arch/i386/bf_enc_586.S $S/crypto/blowfish/arch/i386/bf_enc_686.S" \
 	compile-with	"${CC} -c -I$S/crypto/blowfish/arch/i386 ${ASM_CFLAGS} ${WERROR} ${.IMPSRC}" \

Modified: head/sys/conf/files.pc98
==============================================================================
--- head/sys/conf/files.pc98	Fri May  8 15:14:52 2009	(r191918)
+++ head/sys/conf/files.pc98	Fri May  8 20:06:37 2009	(r191919)
@@ -71,7 +71,6 @@ compat/svr4/svr4_syscallnames.c	optional
 compat/svr4/svr4_sysent.c	optional compat_svr4
 compat/svr4/svr4_sysvec.c	optional compat_svr4
 compat/svr4/svr4_termios.c	optional compat_svr4
-compat/svr4/svr4_ttold.c	optional compat_svr4
 bf_enc.o			optional crypto | ipsec	\
 	dependency	"$S/crypto/blowfish/arch/i386/bf_enc.S $S/crypto/blowfish/arch/i386/bf_enc_586.S $S/crypto/blowfish/arch/i386/bf_enc_686.S" \
 	compile-with	"${CC} -c -I$S/crypto/blowfish/arch/i386 ${ASM_CFLAGS} ${WERROR} ${.IMPSRC}" \

Modified: head/sys/i386/ibcs2/ibcs2_ioctl.c
==============================================================================
--- head/sys/i386/ibcs2/ibcs2_ioctl.c	Fri May  8 15:14:52 2009	(r191918)
+++ head/sys/i386/ibcs2/ibcs2_ioctl.c	Fri May  8 20:06:37 2009	(r191919)
@@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/file.h>
 #include <sys/filedesc.h>
 #include <sys/filio.h>
-#include <sys/ioctl_compat.h>
 #include <sys/kbio.h>
 #include <sys/lock.h>
 #include <sys/mutex.h>
@@ -56,34 +55,6 @@ static void btios2stios(struct termios *
 static void stios2stio(struct ibcs2_termios *, struct ibcs2_termio *);
 static void stio2stios(struct ibcs2_termio *, struct ibcs2_termios *);
 
-
-#ifndef BURN_BRIDGES
-int
-ibcs2_gtty(struct thread *td, struct ibcs2_gtty_args *args)
-{
-	struct ioctl_args ioctl_arg;
-
-	ioctl_arg.fd = args->fd;
-	ioctl_arg.com = TIOCGETC;
-	ioctl_arg.data = (caddr_t)args->buf;
-
-	return ioctl(td, &ioctl_arg);
-}
-
-int
-ibcs2_stty(struct thread *td, struct ibcs2_stty_args *args)
-{
-	struct ioctl_args ioctl_arg;
-
-	ioctl_arg.fd = args->fd;
-	ioctl_arg.com = TIOCSETC;
-	ioctl_arg.data = (caddr_t)args->buf;
-
-	return ioctl(td, &ioctl_arg);
-}
-#endif /* BURN BRIDGES */
-
-
 /*
  * iBCS2 ioctl calls.
  */

Modified: head/sys/i386/ibcs2/syscalls.master
==============================================================================
--- head/sys/i386/ibcs2/syscalls.master	Fri May  8 15:14:52 2009	(r191918)
+++ head/sys/i386/ibcs2/syscalls.master	Fri May  8 20:06:37 2009	(r191919)
@@ -79,10 +79,8 @@
 29	AUE_NULL	STD	{ int ibcs2_pause(void); }
 30	AUE_NULL	STD	{ int ibcs2_utime(char *path, \
 				    struct ibcs2_utimbuf *buf); }
-31	AUE_NULL	STD	{ int ibcs2_stty(int fd, \
-				    struct sgttyb *buf); }
-32	AUE_NULL	STD	{ int ibcs2_gtty(int fd, \
-				    struct sgttyb *buf); }
+31	AUE_NULL	UNIMPL	ibcs2_stty
+32	AUE_NULL	UNIMPL	ibcs2_gtty
 33	AUE_ACCESS	STD	{ int ibcs2_access(char *path, int flags); }
 34	AUE_NICE	STD	{ int ibcs2_nice(int incr); }
 35	AUE_STATFS	STD	{ int ibcs2_statfs(char *path, \

Modified: head/sys/modules/svr4/Makefile
==============================================================================
--- head/sys/modules/svr4/Makefile	Fri May  8 15:14:52 2009	(r191918)
+++ head/sys/modules/svr4/Makefile	Fri May  8 20:06:37 2009	(r191919)
@@ -4,7 +4,7 @@
 KMOD=	svr4
 SRCS=	svr4_sysent.c svr4_sysvec.c opt_compat.h opt_mac.h opt_svr4.h \
 	vnode_if.h imgact_svr4.c svr4_signal.c svr4_fcntl.c \
-	svr4_misc.c svr4_ioctl.c svr4_stat.c svr4_filio.c svr4_ttold.c \
+	svr4_misc.c svr4_ioctl.c svr4_stat.c svr4_filio.c \
 	svr4_termios.c svr4_stream.c svr4_socket.c svr4_sockio.c \
 	svr4_machdep.c svr4_resource.c svr4_ipc.c
 OBJS=	svr4_locore.o 

Modified: head/sys/sys/ioctl_compat.h
==============================================================================
--- head/sys/sys/ioctl_compat.h	Fri May  8 15:14:52 2009	(r191918)
+++ head/sys/sys/ioctl_compat.h	Fri May  8 20:06:37 2009	(r191919)
@@ -40,6 +40,10 @@
 
 #ifdef _KERNEL
 
+#ifndef COMPAT_43TTY
+#error "Definitions not available without TTY ioctl compat."
+#endif
+
 struct tchars {
 	char	t_intrc;	/* interrupt */
 	char	t_quitc;	/* quit */


More information about the svn-src-all mailing list