diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 969fef3a01a5..bba36bb18084 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -14,6 +14,11 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20080614: sgtty removed +OLD_FILES+=usr/include/sys/ttychars.h +OLD_FILES+=usr/include/sys/ttydev.h +OLD_FILES+=usr/share/man/man3/gtty.3.gz +OLD_FILES+=usr/share/man/man3/stty.3.gz # 20080609: gpt(8) removed OLD_FILES+=sbin/gpt OLD_FILES+=usr/share/man/man8/gpt.8.gz diff --git a/include/sgtty.h b/include/sgtty.h index 723c69d6f6ce..254b97f0b496 100644 --- a/include/sgtty.h +++ b/include/sgtty.h @@ -1,39 +1,3 @@ -/* - * Copyright (c) 1985, 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. 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. - * - * 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. - * - * @(#)sgtty.h 8.1 (Berkeley) 6/2/93 - */ - -#ifndef USE_OLD_TTY -#define USE_OLD_TTY -#endif -#include +/* $FreeBSD$ */ +#error "The sgtty interface has been replaced by termios(4)" +#error "Try to use or migrate to " diff --git a/lib/libcompat/4.1/gtty.c b/lib/libcompat/4.1/gtty.c deleted file mode 100644 index 524f1a64753d..000000000000 --- a/lib/libcompat/4.1/gtty.c +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 1994 Christopher G. Demetriou - * 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Christopher G. Demetriou. - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. - */ - -#ifndef lint -static char rcsid[] = "$FreeBSD$"; -#endif /* not lint */ - -#include - -/* - * Get tty modes. - * This was defined in ioctl_compat.h as: - * #define gtty(fd, tty) ioctl(fd, TIOCGETP, tty) - */ - -#undef gtty - -int -gtty(fd, tty) - int fd; - struct sgttyb *tty; -{ - - return (ioctl(fd, TIOCGETP, tty)); -} diff --git a/lib/libcompat/4.1/stty.3 b/lib/libcompat/4.1/stty.3 deleted file mode 100644 index 139695717f32..000000000000 --- a/lib/libcompat/4.1/stty.3 +++ /dev/null @@ -1,94 +0,0 @@ -.\" Copyright (c) 1983, 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. -.\" 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. -.\" -.\" 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. -.\" -.\" @(#)stty.3 8.1 (Berkeley) 6/4/93 -.\" $FreeBSD$ -.\" -.Dd June 4, 1993 -.Dt STTY 3 -.Os -.Sh NAME -.Nm stty , -.Nm gtty -.Nd set and get terminal state (defunct) -.Sh LIBRARY -.Lb libcompat -.Sh SYNOPSIS -.In sgtty.h -.Ft int -.Fn stty "int fd" "struct sgttyb *buf" -.Ft int -.Fn gtty "int fd" "struct sgttyb *buf" -.Sh DESCRIPTION -.Bf -symbolic -These interfaces are obsoleted by -.Xr ioctl 2 . -.Ef -.Pp -The -.Fn stty -function -sets the state of the terminal associated with -.Fa fd . -The -.Fn gtty -function -retrieves the state of the terminal associated -with -.Fa fd . -To set the state of a terminal the call must have -write permission. -.Pp -The -.Fn stty -call is actually -.Ql ioctl(fd, TIOCSETP, buf) , -while -the -.Fn gtty -call is -.Ql ioctl(fd, TIOCGETP, buf) . -See -.Xr ioctl 2 -and -.Xr tty 4 -for an explanation. -.Sh DIAGNOSTICS -If the call is successful 0 is returned, otherwise \-1 is -returned and the global variable -.Va errno -contains the reason for the failure. -.Sh SEE ALSO -.Xr ioctl 2 , -.Xr tty 4 -.Sh HISTORY -The -.Fn stty -and -.Fn gtty -functions appeared in -.Bx 4.2 . diff --git a/lib/libcompat/4.1/stty.c b/lib/libcompat/4.1/stty.c deleted file mode 100644 index cf0137f7ac19..000000000000 --- a/lib/libcompat/4.1/stty.c +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 1994 Christopher G. Demetriou - * 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by Christopher G. Demetriou. - * 4. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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. - */ - -#ifndef lint -static char rcsid[] = "$FreeBSD$"; -#endif /* not lint */ - -#include - -/* - * Set tty modes. - * This was defined in ioctl_compat.h as: - * #define stty(fd, tty) ioctl(fd, TIOCSETP, tty) - */ - -#undef stty - -int -stty(fd, tty) - int fd; - struct sgttyb *tty; -{ - - return (ioctl(fd, TIOCSETP, tty)); -} diff --git a/lib/libcompat/Makefile b/lib/libcompat/Makefile index b9b174daa89a..106bab970af4 100644 --- a/lib/libcompat/Makefile +++ b/lib/libcompat/Makefile @@ -12,12 +12,11 @@ NO_PIC= # compat 4.1 sources # XXX MISSING: tell.c -SRCS+= ascftime.c cftime.c ftime.c getpw.c gtty.c stty.c +SRCS+= ascftime.c cftime.c ftime.c getpw.c -MAN+= 4.1/ftime.3 4.1/getpw.3 4.1/stty.3 +MAN+= 4.1/ftime.3 4.1/getpw.3 MAN+= 4.1/cftime.3 -MLINKS+=stty.3 gtty.3 MLINKS+=cftime.3 ascftime.3 # compat 4.3 sources diff --git a/sys/sys/ioctl.h b/sys/sys/ioctl.h index 7abb328c7a5b..670240928ccc 100644 --- a/sys/sys/ioctl.h +++ b/sys/sys/ioctl.h @@ -69,14 +69,3 @@ struct ttysize { #include #endif /* !_SYS_IOCTL_H_ */ - -/* - * Keep outside _SYS_IOCTL_H_ - * Compatibility with old terminal driver - * - * Source level -> #define USE_OLD_TTY - * Kernel level -> options COMPAT_43TTY - */ -#if defined(USE_OLD_TTY) || defined(COMPAT_43TTY) -#include -#endif diff --git a/sys/sys/ioctl_compat.h b/sys/sys/ioctl_compat.h index a8269fffc358..9be7dd2a757e 100644 --- a/sys/sys/ioctl_compat.h +++ b/sys/sys/ioctl_compat.h @@ -38,12 +38,7 @@ #ifndef _SYS_IOCTL_COMPAT_H_ #define _SYS_IOCTL_COMPAT_H_ -#include -#include - -#ifdef USE_OLD_TTY -#warning "Old BSD tty API used and depends on COMPAT_43TTY. Use termios.h instead" -#endif +#ifdef _KERNEL struct tchars { char t_intrc; /* interrupt */ @@ -77,15 +72,8 @@ struct sgttyb { }; #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 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 */ @@ -161,6 +149,10 @@ struct sgttyb { #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 */ + +#endif /* _KERNEL */ + +/* XXX publish these so stty(1) can still report them */ #define OTTYDISC 0 #define NETLDISC 1 #define NTTYDISC 2 diff --git a/sys/sys/param.h b/sys/sys/param.h index 5db31461c5a1..98d153a8d417 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -57,7 +57,7 @@ * is created, otherwise 1. */ #undef __FreeBSD_version -#define __FreeBSD_version 800038 /* Master, propagated to newvers */ +#define __FreeBSD_version 800039 /* Master, propagated to newvers */ #ifndef LOCORE #include diff --git a/sys/sys/ttychars.h b/sys/sys/ttychars.h deleted file mode 100644 index 56a55d4f87d6..000000000000 --- a/sys/sys/ttychars.h +++ /dev/null @@ -1,62 +0,0 @@ -/*- - * Copyright (c) 1982, 1986, 1990, 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. - * 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. - * - * 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. - * - * @(#)ttychars.h 8.2 (Berkeley) 1/4/94 - * $FreeBSD$ - */ - -#ifndef _SYS_TTYCHARS_H_ -#define _SYS_TTYCHARS_H_ - -/* - * 4.3 COMPATIBILITY FILE - * - * User visible structures and constants related to terminal handling. - */ - -struct ttychars { - char tc_erase; /* erase last character */ - char tc_kill; /* erase entire line */ - char tc_intrc; /* interrupt */ - char tc_quitc; /* quit */ - char tc_startc; /* start output */ - char tc_stopc; /* stop output */ - char tc_eofc; /* end-of-file */ - char tc_brkc; /* input delimiter (like nl) */ - char tc_suspc; /* stop process signal */ - char tc_dsuspc; /* delayed stop process signal */ - char tc_rprntc; /* reprint line */ - char tc_flushc; /* flush output (toggles) */ - char tc_werasc; /* word erase */ - char tc_lnextc; /* literal next character */ -}; -#ifdef USE_OLD_TTY -#include /* to pick up character defaults */ -#endif - -#endif /* !_SYS_TTYCHARS_H_ */ diff --git a/sys/sys/ttydev.h b/sys/sys/ttydev.h deleted file mode 100644 index d6d6b4c41dc6..000000000000 --- a/sys/sys/ttydev.h +++ /dev/null @@ -1,62 +0,0 @@ -/*- - * Copyright (c) 1982, 1986, 1990, 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. - * 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. - * - * 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. - * - * @(#)ttydev.h 8.2 (Berkeley) 1/4/94 - * $FreeBSD$ - */ - -/* COMPATIBILITY HEADER FILE */ - -#ifndef _SYS_TTYDEV_H_ -#define _SYS_TTYDEV_H_ - -#ifdef USE_OLD_TTY -#define B0 0 -#define B50 1 -#define B75 2 -#define B110 3 -#define B134 4 -#define B150 5 -#define B200 6 -#define B300 7 -#define B600 8 -#define B1200 9 -#define B1800 10 -#define B2400 11 -#define B4800 12 -#define B9600 13 -#define EXTA 14 -#define EXTB 15 -#define B57600 16 -#define B115200 17 -#define B230400 18 -#define B460800 19 -#define B921600 20 -#endif /* USE_OLD_TTY */ - -#endif /* !_SYS_TTYDEV_H_ */