I would like to use the current momentum of the <sgtty.h> removal and kill the remaining parts of the COMPAT_43 tty handling in the kernel, too. (There are some further network-related COMPAT_43 fragments that are not touched by this.)
The diff below has only been tested as far as building and running a kernel. I'm throwing this out so people with a better understanding of the kernel can tell me if I'm missing something. In kern/tty_conf.c, should linesw[2] be changed to match linesw[1]? Index: compat/common/tty_43.c =================================================================== RCS file: compat/common/tty_43.c diff -N compat/common/tty_43.c --- compat/common/tty_43.c 9 Apr 2013 02:56:50 -0000 1.11 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,485 +0,0 @@ -/* $OpenBSD: tty_43.c,v 1.11 2013/04/09 02:56:50 tedu Exp $ */ -/* $NetBSD: tty_43.c,v 1.5 1996/05/20 14:29:17 mark Exp $ */ - -/*- - * Copyright (c) 1982, 1986, 1991, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 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. 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. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)tty_compat.c 8.1 (Berkeley) 6/10/93 - */ - -/* - * mapping routines for old line discipline (yuck) - */ -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/ioctl.h> -#include <sys/proc.h> -#include <sys/tty.h> -#include <sys/termios.h> -#include <sys/file.h> -#include <sys/conf.h> -#include <sys/kernel.h> -#include <sys/syslog.h> -#include <sys/ioctl_compat.h> - -/* - * XXX libcompat files should be included with config attributes - */ -#ifdef COMPAT_OLDTTY - -int ttydebug = 0; - -static const struct speedtab compatspeeds[] = { -#define MAX_SPEED 17 - { 115200, 17 }, - { 57600, 16 }, - { 38400, 15 }, - { 19200, 14 }, - { 9600, 13 }, - { 4800, 12 }, - { 2400, 11 }, - { 1800, 10 }, - { 1200, 9 }, - { 600, 8 }, - { 300, 7 }, - { 200, 6 }, - { 150, 5 }, - { 134, 4 }, - { 110, 3 }, - { 75, 2 }, - { 50, 1 }, - { 0, 0 }, - { -1, -1 }, -}; -static const int compatspcodes[] = { - 0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, - 1800, 2400, 4800, 9600, 19200, 38400, 57600, 115200 -}; - -int ttcompatgetflags(struct tty *); -void ttcompatsetflags(struct tty *, struct termios *); -void ttcompatsetlflags(struct tty *, struct termios *); - -/*ARGSUSED*/ -int -ttcompat(struct tty *tp, u_long com, caddr_t data, int flag, struct proc *p) -{ - - switch (com) { - case TIOCGETP: { - struct sgttyb *sg = (struct sgttyb *)data; - u_char *cc = tp->t_cc; - int speed; - - speed = ttspeedtab(tp->t_ospeed, compatspeeds); - sg->sg_ospeed = (speed == -1) ? MAX_SPEED : speed; - if (tp->t_ispeed == 0) - sg->sg_ispeed = sg->sg_ospeed; - else { - speed = ttspeedtab(tp->t_ispeed, compatspeeds); - sg->sg_ispeed = (speed == -1) ? MAX_SPEED : speed; - } - sg->sg_erase = cc[VERASE]; - sg->sg_kill = cc[VKILL]; - sg->sg_flags = ttcompatgetflags(tp); - break; - } - - case TIOCSETP: - case TIOCSETN: { - struct sgttyb *sg = (struct sgttyb *)data; - struct termios term; - int speed; - - term = tp->t_termios; - if ((speed = sg->sg_ispeed) > MAX_SPEED || speed < 0) - term.c_ispeed = speed; - else - term.c_ispeed = compatspcodes[speed]; - if ((speed = sg->sg_ospeed) > MAX_SPEED || speed < 0) - term.c_ospeed = speed; - else - term.c_ospeed = compatspcodes[speed]; - term.c_cc[VERASE] = sg->sg_erase; - term.c_cc[VKILL] = sg->sg_kill; - tp->t_flags = (ttcompatgetflags(tp) & 0xffff0000) | - (sg->sg_flags & 0xffff); - ttcompatsetflags(tp, &term); - return (ttioctl(tp, com == TIOCSETP ? TIOCSETAF : TIOCSETA, - (caddr_t)&term, flag, p)); - } - - case TIOCGETC: { - struct tchars *tc = (struct tchars *)data; - u_char *cc = tp->t_cc; - - tc->t_intrc = cc[VINTR]; - tc->t_quitc = cc[VQUIT]; - tc->t_startc = cc[VSTART]; - tc->t_stopc = cc[VSTOP]; - tc->t_eofc = cc[VEOF]; - tc->t_brkc = cc[VEOL]; - break; - } - case TIOCSETC: { - struct tchars *tc = (struct tchars *)data; - u_char *cc = tp->t_cc; - - cc[VINTR] = tc->t_intrc; - cc[VQUIT] = tc->t_quitc; - cc[VSTART] = tc->t_startc; - cc[VSTOP] = tc->t_stopc; - cc[VEOF] = tc->t_eofc; - cc[VEOL] = tc->t_brkc; - if (tc->t_brkc == (char)-1) - cc[VEOL2] = _POSIX_VDISABLE; - break; - } - case TIOCSLTC: { - struct ltchars *ltc = (struct ltchars *)data; - u_char *cc = tp->t_cc; - - cc[VSUSP] = ltc->t_suspc; - cc[VDSUSP] = ltc->t_dsuspc; - cc[VREPRINT] = ltc->t_rprntc; - cc[VDISCARD] = ltc->t_flushc; - cc[VWERASE] = ltc->t_werasc; - cc[VLNEXT] = ltc->t_lnextc; - break; - } - case TIOCGLTC: { - struct ltchars *ltc = (struct ltchars *)data; - u_char *cc = tp->t_cc; - - ltc->t_suspc = cc[VSUSP]; - ltc->t_dsuspc = cc[VDSUSP]; - ltc->t_rprntc = cc[VREPRINT]; - ltc->t_flushc = cc[VDISCARD]; - ltc->t_werasc = cc[VWERASE]; - ltc->t_lnextc = cc[VLNEXT]; - break; - } - case TIOCLBIS: - case TIOCLBIC: - case TIOCLSET: { - struct termios term; - int flags; - - term = tp->t_termios; - flags = ttcompatgetflags(tp); - switch (com) { - case TIOCLSET: - tp->t_flags = (flags & 0xffff) | (*(int *)data << 16); - break; - case TIOCLBIS: - tp->t_flags = flags | (*(int *)data << 16); - break; - case TIOCLBIC: - tp->t_flags = flags & ~(*(int *)data << 16); - break; - } - ttcompatsetlflags(tp, &term); - return (ttioctl(tp, TIOCSETA, (caddr_t)&term, flag, p)); - } - case TIOCLGET: - *(int *)data = ttcompatgetflags(tp) >> 16; - if (ttydebug) - printf("CLGET: returning %x\n", *(int *)data); - break; - - case OTIOCGETD: - *(int *)data = tp->t_line ? tp->t_line : 2; - break; - - case OTIOCSETD: { - int ldisczero = 0; - - return (ttioctl(tp, TIOCSETD, - *(int *)data == 2 ? (caddr_t)&ldisczero : data, flag, p)); - } - case OTIOCCONS: - *(int *)data = 1; - return (ttioctl(tp, TIOCCONS, data, flag, p)); - - case TIOCHPCL: - SET(tp->t_cflag, HUPCL); - break; - - case TIOCGSID: - if (tp->t_session == NULL) - return (ENOTTY); - - if (tp->t_session->s_leader == NULL) - return (ENOTTY); - - *(int *)data = tp->t_session->s_leader->ps_pid; - break; - - default: - return (-1); - } - return (0); -} - -int -ttcompatgetflags(struct tty *tp) -{ - tcflag_t iflag = tp->t_iflag; - tcflag_t lflag = tp->t_lflag; - tcflag_t oflag = tp->t_oflag; - tcflag_t cflag = tp->t_cflag; - int flags = 0; - - if (ISSET(iflag, IXOFF)) - SET(flags, TANDEM); - if (ISSET(iflag, ICRNL) || ISSET(oflag, ONLCR)) - SET(flags, CRMOD); - if (ISSET(cflag, PARENB)) { - if (ISSET(iflag, INPCK)) { - if (ISSET(cflag, PARODD)) - SET(flags, ODDP); - else - SET(flags, EVENP); - } else - SET(flags, ANYP); - } - - if (!ISSET(lflag, ICANON)) { - /* fudge */ - if (ISSET(iflag, IXON) || ISSET(lflag, ISIG|IEXTEN) || - ISSET(cflag, PARENB)) - SET(flags, CBREAK); - else - SET(flags, RAW); - } - - if (ISSET(flags, RAW)) - SET(flags, ISSET(tp->t_flags, LITOUT|PASS8)); - else if (ISSET(cflag, CSIZE) == CS8) { - if (!ISSET(oflag, OPOST)) - SET(flags, LITOUT); - if (!ISSET(iflag, ISTRIP)) - SET(flags, PASS8); - } - - if (ISSET(cflag, MDMBUF)) - SET(flags, MDMBUF); - if (!ISSET(cflag, HUPCL)) - SET(flags, NOHANG); - if (ISSET(cflag, XCASE) && ISSET(iflag, IUCLC) && ISSET(oflag, OLCUC)) - SET(flags, LCASE); - if (ISSET(oflag, OXTABS)) - SET(flags, XTABS); - if (ISSET(lflag, ECHOE)) - SET(flags, CRTERA|CRTBS); - if (ISSET(lflag, ECHOKE)) - SET(flags, CRTKIL|CRTBS); - if (ISSET(lflag, ECHOPRT)) - SET(flags, PRTERA); - if (ISSET(lflag, ECHOCTL)) - SET(flags, CTLECH); - if (!ISSET(iflag, IXANY)) - SET(flags, DECCTQ); - SET(flags, ISSET(lflag, ECHO|TOSTOP|FLUSHO|PENDIN|NOFLSH)); - if (ttydebug) - printf("getflags: %x\n", flags); - return (flags); -} - -void -ttcompatsetflags(struct tty *tp, struct termios *t) -{ - int flags = tp->t_flags; - tcflag_t iflag = t->c_iflag; - tcflag_t oflag = t->c_oflag; - tcflag_t lflag = t->c_lflag; - tcflag_t cflag = t->c_cflag; - - if (ISSET(flags, TANDEM)) - SET(iflag, IXOFF); - else - CLR(iflag, IXOFF); - if (ISSET(flags, ECHO)) - SET(lflag, ECHO); - else - CLR(lflag, ECHO); - if (ISSET(flags, CRMOD)) { - SET(iflag, ICRNL); - SET(oflag, ONLCR); - } else { - CLR(iflag, ICRNL); - CLR(oflag, ONLCR); - } - if (ISSET(flags, XTABS)) - SET(oflag, OXTABS); - else - CLR(oflag, OXTABS); - if (ISSET(flags, LCASE)) { - SET(iflag, IUCLC); - SET(oflag, OLCUC); - SET(cflag, XCASE); - } - else { - CLR(iflag, IUCLC); - CLR(oflag, OLCUC); - CLR(cflag, XCASE); - } - - if (ISSET(flags, RAW)) { - iflag &= IXOFF|IXANY; - CLR(lflag, ISIG|ICANON|IEXTEN); - CLR(cflag, PARENB); - } else { - SET(iflag, BRKINT|IXON|IMAXBEL); - SET(lflag, ISIG|IEXTEN); - if (ISSET(flags, CBREAK)) - CLR(lflag, ICANON); - else - SET(lflag, ICANON); - switch (ISSET(flags, ANYP)) { - case 0: - CLR(cflag, PARENB); - break; - case ANYP: - SET(cflag, PARENB); - CLR(iflag, INPCK); - break; - case EVENP: - SET(cflag, PARENB); - SET(iflag, INPCK); - CLR(cflag, PARODD); - break; - case ODDP: - SET(cflag, PARENB); - SET(iflag, INPCK); - SET(cflag, PARODD); - break; - } - } - - if (ISSET(flags, RAW|LITOUT|PASS8)) { - CLR(cflag, CSIZE|XCASE); - SET(cflag, CS8); - if (!ISSET(flags, RAW|PASS8)) - SET(iflag, ISTRIP); - else - CLR(iflag, ISTRIP); - if (!ISSET(flags, RAW|LITOUT)) - SET(oflag, OPOST); - else - CLR(oflag, OPOST); - } else { - CLR(cflag, CSIZE); - SET(cflag, CS7); - if (ISSET(iflag, IUCLC) && ISSET(oflag, OLCUC)) - SET(cflag, XCASE); - SET(iflag, ISTRIP); - SET(oflag, OPOST); - } - - t->c_iflag = iflag; - t->c_oflag = oflag; - t->c_lflag = lflag; - t->c_cflag = cflag; -} - -void -ttcompatsetlflags(struct tty *tp, struct termios *t) -{ - int flags = tp->t_flags; - tcflag_t iflag = t->c_iflag; - tcflag_t oflag = t->c_oflag; - tcflag_t lflag = t->c_lflag; - tcflag_t cflag = t->c_cflag; - - /* Nothing we can do with CRTBS. */ - if (ISSET(flags, PRTERA)) - SET(lflag, ECHOPRT); - else - CLR(lflag, ECHOPRT); - if (ISSET(flags, CRTERA)) - SET(lflag, ECHOE); - else - CLR(lflag, ECHOE); - /* Nothing we can do with TILDE. */ - if (ISSET(flags, MDMBUF)) - SET(cflag, MDMBUF); - else - CLR(cflag, MDMBUF); - if (ISSET(flags, NOHANG)) - CLR(cflag, HUPCL); - else - SET(cflag, HUPCL); - if (ISSET(flags, CRTKIL)) - SET(lflag, ECHOKE); - else - CLR(lflag, ECHOKE); - if (ISSET(flags, CTLECH)) - SET(lflag, ECHOCTL); - else - CLR(lflag, ECHOCTL); - if (!ISSET(flags, DECCTQ)) - SET(iflag, IXANY); - else - CLR(iflag, IXANY); - if (ISSET(flags, LCASE)) { - SET(oflag, OLCUC); - SET(iflag, IUCLC); - SET(cflag, XCASE); - } - CLR(lflag, TOSTOP|FLUSHO|PENDIN|NOFLSH); - SET(lflag, ISSET(flags, TOSTOP|FLUSHO|PENDIN|NOFLSH)); - - if (ISSET(flags, RAW|LITOUT|PASS8)) { - CLR(cflag, CSIZE); - SET(cflag, CS8); - if (!ISSET(flags, RAW|PASS8)) - SET(iflag, ISTRIP); - else - CLR(iflag, ISTRIP); - if (!ISSET(flags, RAW|LITOUT)) - SET(oflag, OPOST); - else { - CLR(oflag, OPOST); - CLR(cflag, XCASE); - } - } else { - CLR(cflag, CSIZE); - SET(cflag, CS7); - SET(iflag, ISTRIP); - SET(oflag, OPOST); - if (ISSET(oflag, OLCUC) && ISSET(iflag, IUCLC)) - SET(cflag, XCASE); - } - - t->c_iflag = iflag; - t->c_oflag = oflag; - t->c_lflag = lflag; - t->c_cflag = cflag; -} -#endif /* COMPAT_OLDTTY */ Index: conf/files =================================================================== RCS file: /cvs/src/sys/conf/files,v retrieving revision 1.562 diff -u -p -r1.562 files --- conf/files 11 Nov 2013 09:15:34 -0000 1.562 +++ conf/files 8 Dec 2013 15:04:26 -0000 @@ -999,7 +999,6 @@ file net/pfkeyv2_convert.c key | ipsec # COMPAT_* support code (base and other shared code) file compat/common/compat_util.c !small_kernel file compat/common/compat_dir.c !small_kernel & compat_linux -file compat/common/tty_43.c compat_43 # libx86emu file dev/x86emu/x86emu.c x86emu Index: kern/tty.c =================================================================== RCS file: /cvs/src/sys/kern/tty.c,v retrieving revision 1.102 diff -u -p -r1.102 tty.c --- kern/tty.c 11 Oct 2013 12:44:12 -0000 1.102 +++ kern/tty.c 8 Dec 2013 15:05:28 -0000 @@ -183,9 +183,6 @@ ttyopen(dev_t device, struct tty *tp, st SET(tp->t_state, TS_ISOPEN); bzero(&tp->t_winsize, sizeof(tp->t_winsize)); tp->t_column = 0; -#ifdef COMPAT_OLDTTY - tp->t_flags = 0; -#endif } CLR(tp->t_state, TS_WOPEN); splx(s); @@ -740,16 +737,6 @@ ttioctl(struct tty *tp, u_long cmd, cadd case TIOCSTAT: case TIOCSTI: case TIOCSWINSZ: -#ifdef COMPAT_OLDTTY - case TIOCLBIC: - case TIOCLBIS: - case TIOCLSET: - case TIOCSETC: - case OTIOCSETD: - case TIOCSETN: - case TIOCSETP: - case TIOCSLTC: -#endif while (isbackground(pr, tp) && (pr->ps_flags & PS_PPWAIT) == 0 && (p->p_sigacts->ps_sigignore & sigmask(SIGTTOU)) == 0 && @@ -1041,11 +1028,7 @@ ttioctl(struct tty *tp, u_long cmd, cadd break; } default: -#ifdef COMPAT_OLDTTY - return (ttcompat(tp, cmd, data, flag, p)); -#else return (-1); -#endif } return (0); } Index: kern/tty_pty.c =================================================================== RCS file: /cvs/src/sys/kern/tty_pty.c,v retrieving revision 1.62 diff -u -p -r1.62 tty_pty.c --- kern/tty_pty.c 11 Oct 2013 12:44:13 -0000 1.62 +++ kern/tty_pty.c 8 Dec 2013 15:05:45 -0000 @@ -833,10 +833,6 @@ ptyioctl(dev_t dev, u_long cmd, caddr_t ttyflush(tp, FREAD|FWRITE); return (0); -#ifdef COMPAT_OLDTTY - case TIOCSETP: - case TIOCSETN: -#endif case TIOCSETD: case TIOCSETA: case TIOCSETAW: @@ -886,15 +882,6 @@ ptyioctl(dev_t dev, u_long cmd, caddr_t case TIOCSETA: case TIOCSETAW: case TIOCSETAF: -#ifdef COMPAT_OLDTTY - case TIOCSETP: - case TIOCSETN: - case TIOCSETC: - case TIOCSLTC: - case TIOCLBIS: - case TIOCLBIC: - case TIOCLSET: -#endif pti->pt_send |= TIOCPKT_IOCTL; ptcwakeup(tp, FREAD); default: Index: sys/ioctl_compat.h =================================================================== RCS file: /cvs/src/sys/sys/ioctl_compat.h,v retrieving revision 1.4 diff -u -p -r1.4 ioctl_compat.h --- sys/ioctl_compat.h 2 Jun 2003 23:28:21 -0000 1.4 +++ sys/ioctl_compat.h 8 Dec 2013 15:06:58 -0000 @@ -40,131 +40,6 @@ #ifndef _SYS_IOCTL_COMPAT_H_ #define _SYS_IOCTL_COMPAT_H_ -#include <sys/ttychars.h> -#include <sys/ttydev.h> - -struct tchars { - char t_intrc; /* interrupt */ - char t_quitc; /* quit */ - char t_startc; /* start output */ - char t_stopc; /* stop output */ - char t_eofc; /* end-of-file */ - char t_brkc; /* input delimiter (like nl) */ -}; - -struct ltchars { - char t_suspc; /* stop process signal */ - char t_dsuspc; /* delayed stop process signal */ - char t_rprntc; /* reprint line */ - char t_flushc; /* flush output (toggles) */ - char t_werasc; /* word erase */ - char t_lnextc; /* literal next character */ -}; - -/* - * Structure for TIOCGETP and TIOCSETP ioctls. - */ -#ifndef _SGTTYB_ -#define _SGTTYB_ -struct sgttyb { - char sg_ispeed; /* input speed */ - char sg_ospeed; /* output speed */ - char sg_erase; /* erase character */ - char sg_kill; /* kill character */ - short sg_flags; /* mode flags */ -}; -#endif - -#ifdef USE_OLD_TTY -# undef TIOCGETD -# define TIOCGETD _IOR('t', 0, int) /* get line discipline */ -# undef TIOCSETD -# define TIOCSETD _IOW('t', 1, int) /* set line discipline */ -#else -# define OTIOCGETD _IOR('t', 0, int) /* get line discipline */ -# define OTIOCSETD _IOW('t', 1, int) /* set line discipline */ -#endif -#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 TANDEM 0x00000001 /* send stopc on out q full */ -#define CBREAK 0x00000002 /* half-cooked mode */ -#define LCASE 0x00000004 /* simulate lower case */ -#define ECHO 0x00000008 /* echo input */ -#define CRMOD 0x00000010 /* map \r to \r\n on output */ -#define RAW 0x00000020 /* no i/o processing */ -#define ODDP 0x00000040 /* get/send odd parity */ -#define EVENP 0x00000080 /* get/send even parity */ -#define ANYP 0x000000c0 /* get any parity/send none */ -#define NLDELAY 0x00000300 /* \n delay */ -#define NL0 0x00000000 -#define NL1 0x00000100 /* tty 37 */ -#define NL2 0x00000200 /* vt05 */ -#define NL3 0x00000300 -#define TBDELAY 0x00000c00 /* horizontal tab delay */ -#define TAB0 0x00000000 -#define TAB1 0x00000400 /* tty 37 */ -#define TAB2 0x00000800 -#define XTABS 0x00000c00 /* expand tabs on output */ -#define CRDELAY 0x00003000 /* \r delay */ -#define CR0 0x00000000 -#define CR1 0x00001000 /* tn 300 */ -#define CR2 0x00002000 /* tty 37 */ -#define CR3 0x00003000 /* concept 100 */ -#define VTDELAY 0x00004000 /* vertical tab delay */ -#define FF0 0x00000000 -#define FF1 0x00004000 /* tty 37 */ -#define BSDELAY 0x00008000 /* \b delay */ -#define BS0 0x00000000 -#define BS1 0x00008000 -#define ALLDELAY (NLDELAY|TBDELAY|CRDELAY|VTDELAY|BSDELAY) -#define CRTBS 0x00010000 /* do backspacing for crt */ -#define PRTERA 0x00020000 /* \ ... / erase */ -#define CRTERA 0x00040000 /* " \b " to wipe out char */ -#define TILDE 0x00080000 /* hazeltine tilde kludge */ -#define MDMBUF 0x00100000 /*start/stop output on carrier*/ -#define LITOUT 0x00200000 /* literal output */ -#define TOSTOP 0x00400000 /*SIGSTOP on background output*/ -#define FLUSHO 0x00800000 /* flush output to terminal */ -#define NOHANG 0x01000000 /* (no-op) was no SIGHUP on carrier drop */ -#define L001000 0x02000000 -#define CRTKIL 0x04000000 /* kill line with " \b " */ -#define PASS8 0x08000000 -#define CTLECH 0x10000000 /* echo control chars as ^X */ -#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 TIOCLGET _IOR('t', 124, int) /* get local modes */ -#define LCRTBS (CRTBS>>16) -#define LPRTERA (PRTERA>>16) -#define LCRTERA (CRTERA>>16) -#define LTILDE (TILDE>>16) -#define LMDMBUF (MDMBUF>>16) -#define LLITOUT (LITOUT>>16) -#define LTOSTOP (TOSTOP>>16) -#define LFLUSHO (FLUSHO>>16) -#define LNOHANG (NOHANG>>16) -#define LCRTKIL (CRTKIL>>16) -#define LPASS8 (PASS8>>16) -#define LCTLECH (CTLECH>>16) -#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 OTTYDISC 0 -#define NETLDISC 1 -#define NTTYDISC 2 - -#define TIOCGSID _IOR('t', 99, int) /* For svr4 -- get session id */ - /* * Passthrough ioctl commands. These are passed through to devices * as they are, it is expected that the device (an LKM, for example), Index: sys/tty.h =================================================================== RCS file: /cvs/src/sys/sys/tty.h,v retrieving revision 1.32 diff -u -p -r1.32 tty.h --- sys/tty.h 17 Jan 2013 21:24:58 -0000 1.32 +++ sys/tty.h 8 Dec 2013 15:06:05 -0000 @@ -308,9 +308,4 @@ int cttypoll(dev_t, int, struct proc *); void clalloc(struct clist *, int, int); void clfree(struct clist *); -#if defined(COMPAT_43) -# define COMPAT_OLDTTY -int ttcompat(struct tty *, u_long, caddr_t, int, struct proc *); -#endif - #endif -- Christian "naddy" Weisgerber na...@mips.inka.de