diff --git a/sys/compat/svr4/svr4_ioctl.c b/sys/compat/svr4/svr4_ioctl.c index 545d20644eed..61f9d75b9143 100644 --- a/sys/compat/svr4/svr4_ioctl.c +++ b/sys/compat/svr4/svr4_ioctl.c @@ -119,10 +119,12 @@ 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")); diff --git a/sys/compat/svr4/svr4_ttold.c b/sys/compat/svr4/svr4_ttold.c index 7672465b7942..3b4b841a789d 100644 --- a/sys/compat/svr4/svr4_ttold.c +++ b/sys/compat/svr4/svr4_ttold.c @@ -29,6 +29,8 @@ #include __FBSDID("$FreeBSD$"); +#ifndef BURN_BRIDGES + #include #include #include @@ -376,3 +378,5 @@ svr4_ttold_ioctl(fp, td, retval, fd, cmd, data) return 0; /* ENOSYS really */ } } + +#endif /* BURN_BRIDGES */ diff --git a/sys/dev/cy/cy.c b/sys/dev/cy/cy.c index 53e038dad14b..50778d5aeb06 100644 --- a/sys/dev/cy/cy.c +++ b/sys/dev/cy/cy.c @@ -1539,9 +1539,11 @@ sioioctl(dev, cmd, data, flag, td) int mynor; int s; struct tty *tp; +#ifndef BURN_BRIDGES #if defined(COMPAT_43) int oldcmd; struct termios term; +#endif #endif mynor = minor(dev); @@ -1580,6 +1582,7 @@ sioioctl(dev, cmd, data, flag, td) } } tp = com->tp; +#ifndef BURN_BRIDGES #if defined(COMPAT_43) term = tp->t_termios; oldcmd = cmd; @@ -1588,6 +1591,7 @@ sioioctl(dev, cmd, data, flag, td) return (error); if (cmd != oldcmd) data = (caddr_t)&term; +#endif #endif if (cmd == TIOCSETA || cmd == TIOCSETAW || cmd == TIOCSETAF) { int cc; diff --git a/sys/dev/digi/digi.c b/sys/dev/digi/digi.c index 2d9184cda597..19b6cfe1ed21 100644 --- a/sys/dev/digi/digi.c +++ b/sys/dev/digi/digi.c @@ -1072,9 +1072,11 @@ digiioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *t struct digi_softc *sc; struct digi_p *port; struct tty *tp; +#ifndef BURN_BRIDGES #if defined(COMPAT_43) int oldcmd; struct termios term; +#endif #endif mynor = minor(dev); @@ -1226,6 +1228,7 @@ digiioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *t } tp = port->tp; +#ifndef BURN_BRIDGES #if defined(COMPAT_43) term = tp->t_termios; oldcmd = cmd; @@ -1234,6 +1237,7 @@ digiioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *t return (error); if (cmd != oldcmd) data = (caddr_t) & term; +#endif #endif if (cmd == TIOCSETA || cmd == TIOCSETAW || cmd == TIOCSETAF) { int cc; diff --git a/sys/dev/rp/rp.c b/sys/dev/rp/rp.c index 1219ef555f08..6a9eb634bca5 100644 --- a/sys/dev/rp/rp.c +++ b/sys/dev/rp/rp.c @@ -1241,9 +1241,11 @@ rpioctl(dev, cmd, data, flag, td) int error = 0; int arg, flags, result, ChanStatus; struct termios *t; +#ifndef BURN_BRIDGES #if defined(COMPAT_43) u_long oldcmd; struct termios term; +#endif #endif umynor = (((minor(dev) >> 16) -1) * 32); /* SG */ @@ -1289,6 +1291,7 @@ rpioctl(dev, cmd, data, flag, td) tp = rp->rp_tty; cp = &rp->rp_channel; +#ifndef BURN_BRIDGES #if defined(COMPAT_43) term = tp->t_termios; oldcmd = cmd; @@ -1298,6 +1301,7 @@ rpioctl(dev, cmd, data, flag, td) if(cmd != oldcmd) { data = (caddr_t)&term; } +#endif #endif if((cmd == TIOCSETA) || (cmd == TIOCSETAW) || (cmd == TIOCSETAF)) { int cc; diff --git a/sys/dev/si/si.c b/sys/dev/si/si.c index 97321088cd81..ad7d426054ab 100644 --- a/sys/dev/si/si.c +++ b/sys/dev/si/si.c @@ -47,9 +47,11 @@ static const char si_copyright1[] = "@(#) Copyright (C) Specialix International #include #include +#ifndef BURN_BRIDGES #if defined(COMPAT_43) #include #endif +#endif #include #include #include @@ -915,9 +917,11 @@ siioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) int mynor = minor(dev); int oldspl; int blocked = 0; +#ifndef BURN_BRIDGES #if defined(COMPAT_43) u_long oldcmd; struct termios term; +#endif #endif if (IS_SI_IOCTL(cmd)) @@ -964,6 +968,7 @@ siioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) /* * Do the old-style ioctl compat routines... */ +#ifndef BURN_BRIDGES #if defined(COMPAT_43) term = tp->t_termios; oldcmd = cmd; @@ -972,6 +977,7 @@ siioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) return (error); if (cmd != oldcmd) data = (caddr_t)&term; +#endif #endif /* * Do the initial / lock state business @@ -1008,8 +1014,10 @@ siioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) case TIOCSETAW: case TIOCSETAF: case TIOCDRAIN: +#ifndef BURN_BRIDGES #ifdef COMPAT_43 case TIOCSETP: +#endif #endif blocked++; /* block writes for ttywait() and siparam() */ si_write_enable(pp, 0); diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c index a71688351355..50a0ccbb0329 100644 --- a/sys/dev/sio/sio.c +++ b/sys/dev/sio/sio.c @@ -2065,9 +2065,11 @@ sioioctl(dev, cmd, data, flag, td) int mynor; int s; struct tty *tp; +#ifndef BURN_BRIDGES #if defined(COMPAT_43) u_long oldcmd; struct termios term; +#endif #endif mynor = minor(dev); @@ -2075,6 +2077,7 @@ sioioctl(dev, cmd, data, flag, td) if (com == NULL || com->gone) return (ENODEV); tp = com->tp; +#ifndef BURN_BRIDGES #if defined(COMPAT_43) term = tp->t_termios; oldcmd = cmd; @@ -2083,6 +2086,7 @@ sioioctl(dev, cmd, data, flag, td) return (error); if (cmd != oldcmd) data = (caddr_t)&term; +#endif #endif if (cmd == TIOCSETA || cmd == TIOCSETAW || cmd == TIOCSETAF) { int cc; diff --git a/sys/dev/sx/sx.c b/sys/dev/sx/sx.c index 0e0687e63f8a..8a523fa378b7 100644 --- a/sys/dev/sx/sx.c +++ b/sys/dev/sx/sx.c @@ -35,9 +35,11 @@ #include #include +#ifndef BURN_BRIDGES #if defined(COMPAT_43) #include #endif +#endif #include #include #include @@ -703,10 +705,12 @@ sxioctl( int mynor = minor(dev); int oldspl; int blocked = 0; +#ifndef BURN_BRIDGES #if defined(COMPAT_43) u_long oldcmd; struct termios term; +#endif #endif pp = MINOR2PP(mynor); @@ -752,6 +756,7 @@ sxioctl( /* * Do the old-style ioctl compat routines... */ +#ifndef BURN_BRIDGES #if defined(COMPAT_43) term = tp->t_termios; oldcmd = cmd; @@ -760,6 +765,7 @@ sxioctl( return(error); if (cmd != oldcmd) data = (caddr_t)&term; +#endif #endif /* * Do the initial / lock state business @@ -796,8 +802,10 @@ sxioctl( case TIOCSETAW: case TIOCSETAF: case TIOCDRAIN: +#ifndef BURN_BRIDGES #ifdef COMPAT_43 case TIOCSETP: +#endif #endif blocked++; /* block writes for ttywait() and sxparam() */ sx_write_enable(pp, 0); diff --git a/sys/i386/ibcs2/ibcs2_ioctl.c b/sys/i386/ibcs2/ibcs2_ioctl.c index 0f80f6f087ce..434da5062fe8 100644 --- a/sys/i386/ibcs2/ibcs2_ioctl.c +++ b/sys/i386/ibcs2/ibcs2_ioctl.c @@ -57,6 +57,7 @@ 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) { @@ -80,6 +81,7 @@ ibcs2_stty(struct thread *td, struct ibcs2_stty_args *args) return ioctl(td, &ioctl_arg); } +#endif /* BURN BRIDGES */ /* diff --git a/sys/i386/ibcs2/ibcs2_sysent.c b/sys/i386/ibcs2/ibcs2_sysent.c index 7940d3cc1467..4d46451d06fe 100644 --- a/sys/i386/ibcs2/ibcs2_sysent.c +++ b/sys/i386/ibcs2/ibcs2_sysent.c @@ -48,8 +48,13 @@ struct sysent ibcs2_sysent[] = { { AS(ibcs2_fstat_args), (sy_call_t *)ibcs2_fstat }, /* 28 = ibcs2_fstat */ { SYF_MPSAFE | 0, (sy_call_t *)ibcs2_pause }, /* 29 = ibcs2_pause */ { AS(ibcs2_utime_args), (sy_call_t *)ibcs2_utime }, /* 30 = ibcs2_utime */ +#ifndef BURN_BRIDGES { AS(ibcs2_stty_args), (sy_call_t *)ibcs2_stty }, /* 31 = ibcs2_stty */ { AS(ibcs2_gtty_args), (sy_call_t *)ibcs2_gtty }, /* 32 = ibcs2_gtty */ +#else + { AS(ibcs2_stty_args), (sy_call_t *)nosys }, /* 31 = ibcs2_stty */ + { AS(ibcs2_gtty_args), (sy_call_t *)nosys }, /* 32 = ibcs2_gtty */ +#endif { AS(ibcs2_access_args), (sy_call_t *)ibcs2_access }, /* 33 = ibcs2_access */ { SYF_MPSAFE | AS(ibcs2_nice_args), (sy_call_t *)ibcs2_nice }, /* 34 = ibcs2_nice */ { AS(ibcs2_statfs_args), (sy_call_t *)ibcs2_statfs }, /* 35 = ibcs2_statfs */ diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 6c5f4d5714d5..bb35a78f1178 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -83,9 +83,11 @@ __FBSDID("$FreeBSD$"); #include #include #include +#ifndef BURN_BRIDGES #if defined(COMPAT_43) #include #endif +#endif #include #define TTYDEFCHARS #include @@ -769,6 +771,7 @@ ttioctl(struct tty *tp, u_long cmd, void *data, int flag) case TIOCSTI: case TIOCSTOP: case TIOCSWINSZ: +#ifndef BURN_BRIDGES #if defined(COMPAT_43) case TIOCLBIC: case TIOCLBIS: @@ -778,6 +781,7 @@ ttioctl(struct tty *tp, u_long cmd, void *data, int flag) case TIOCSETN: case TIOCSETP: case TIOCSLTC: +#endif #endif sx_slock(&proctree_lock); PROC_LOCK(p); @@ -1131,7 +1135,11 @@ ttioctl(struct tty *tp, u_long cmd, void *data, int flag) break; default: #if defined(COMPAT_43) +#ifndef BURN_BRIDGES return (ttcompat(tp, cmd, data, flag)); +#else + return (ENOIOCTL); +#endif #else return (ENOIOCTL); #endif diff --git a/sys/kern/tty_compat.c b/sys/kern/tty_compat.c index a7e83fbf21f1..f8975b6e8aca 100644 --- a/sys/kern/tty_compat.c +++ b/sys/kern/tty_compat.c @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" +#ifndef BURN_BRIDGES /* * mapping routines for old line discipline (yuck) */ @@ -471,3 +472,5 @@ ttcompatsetlflags(struct tty *tp, struct termios *t) t->c_cflag = cflag; } #endif /* COMPAT_43 */ + +#endif /* BURN_BRIDGES */ diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c index 1e5d20228a52..1cdea9376a05 100644 --- a/sys/kern/tty_pty.c +++ b/sys/kern/tty_pty.c @@ -43,9 +43,11 @@ __FBSDID("$FreeBSD$"); #include #include #include +#ifndef BURN_BRIDGES #if defined(COMPAT_43) #include #endif +#endif #include #include #include @@ -659,9 +661,11 @@ ptyioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td return (EAGAIN); switch (cmd) { +#ifndef BURN_BRIDGES #ifdef COMPAT_43 case TIOCSETP: case TIOCSETN: +#endif #endif case TIOCSETD: case TIOCSETA: @@ -734,16 +738,16 @@ ptyioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td case TIOCSETA: case TIOCSETAW: case TIOCSETAF: +#ifndef BURN_BRIDGES #ifdef COMPAT_43 case TIOCSETP: case TIOCSETN: -#endif -#if defined(COMPAT_43) case TIOCSETC: case TIOCSLTC: case TIOCLBIS: case TIOCLBIC: case TIOCLSET: +#endif #endif pt->pt_send |= TIOCPKT_IOCTL; ptcwakeup(tp, FREAD); diff --git a/sys/sys/ioctl_compat.h b/sys/sys/ioctl_compat.h index 98db895e275b..a290a1ad5daf 100644 --- a/sys/sys/ioctl_compat.h +++ b/sys/sys/ioctl_compat.h @@ -38,6 +38,7 @@ #ifndef _SYS_IOCTL_COMPAT_H_ #define _SYS_IOCTL_COMPAT_H_ +#ifndef BURN_BRIDGES #include #include @@ -161,4 +162,5 @@ struct sgttyb { #define NETLDISC 1 #define NTTYDISC 2 +#endif /* BURN_BRIDGES */ #endif /* !_SYS_IOCTL_COMPAT_H_ */ diff --git a/sys/sys/ttychars.h b/sys/sys/ttychars.h index ec9c247a2fa1..67d69e55c4a7 100644 --- a/sys/sys/ttychars.h +++ b/sys/sys/ttychars.h @@ -33,6 +33,8 @@ #ifndef _SYS_TTYCHARS_H_ #define _SYS_TTYCHARS_H_ +#ifndef BURN_BRIDGES + /* * 4.3 COMPATIBILITY FILE * @@ -58,4 +60,7 @@ struct ttychars { #ifdef USE_OLD_TTY #include /* to pick up character defaults */ #endif + +#endif /* BURN_BRIDGES */ + #endif /* !_SYS_TTYCHARS_H_ */ diff --git a/sys/sys/ttydev.h b/sys/sys/ttydev.h index d6d6b4c41dc6..f6e3791b4491 100644 --- a/sys/sys/ttydev.h +++ b/sys/sys/ttydev.h @@ -35,6 +35,8 @@ #ifndef _SYS_TTYDEV_H_ #define _SYS_TTYDEV_H_ +#ifndef BURN_BRIDGES + #ifdef USE_OLD_TTY #define B0 0 #define B50 1 @@ -59,4 +61,6 @@ #define B921600 20 #endif /* USE_OLD_TTY */ +#endif /* BURN_BRIDGES */ + #endif /* !_SYS_TTYDEV_H_ */