From d88b9605be186eb2c93c4f2683c997a128758b5a Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Fri, 29 Mar 2013 12:58:40 +0100 Subject: [PATCH] kernel: Remove 'options COMPAT_SUNOS'. It was supposed to provide binary compatibility with SunOS 4.x for the sparc32 port of 4.4BSD. --- UPDATING | 6 ++++++ sys/conf/options | 1 - sys/config/LINT | 1 - sys/config/LINT64 | 1 - sys/dev/misc/nmdm/nmdm.c | 2 +- sys/dev/serial/cy/cy.c | 4 ++-- sys/dev/serial/digi/digi.c | 4 ++-- sys/dev/serial/rp/rp.c | 2 +- sys/dev/serial/si/si.c | 2 +- sys/dev/serial/sio/sio.c | 4 ++-- sys/dev/serial/stl/stallion.c | 2 +- sys/emulation/linux/linux_misc.c | 2 +- sys/emulation/linux/linux_uid16.c | 3 +-- sys/kern/kern_prot.c | 6 +++--- sys/kern/tty.c | 9 +++------ sys/kern/tty_compat.c | 5 ++--- sys/kern/tty_pty.c | 4 +--- sys/sys/ioctl.h | 5 ++--- sys/sys/signal.h | 3 --- usr.sbin/ac/ac.8 | 23 +---------------------- 20 files changed, 30 insertions(+), 59 deletions(-) diff --git a/UPDATING b/UPDATING index 362547b8fa..4809512ddb 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,12 @@ + UPGRADING DRAGONFLY FROM 3.2 to later versions + +-----------------------------------------------------------------------+ +COMPAT_SUNOS OPTION REMOVED +--------------------------- + +The COMPAT_SUNOS option has been removed. It was meant to provide binary +compatibility with SunOS 4.x for the sparc32 port of 4.4BSD. + ISA SOUND CARD SUPPORT REMOVED ------------------------------ diff --git a/sys/conf/options b/sys/conf/options index f32f390fc0..003944429e 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -75,7 +75,6 @@ ACPI_ENABLE_PCI opt_acpi.h # Miscellaneous options. COMPAT_43 opt_compat.h -COMPAT_SUNOS opt_compat.h COMPILING_LINT opt_lint.h DDB DDB_TRACE diff --git a/sys/config/LINT b/sys/config/LINT index 12f1b95dbc..7d51b5ec22 100644 --- a/sys/config/LINT +++ b/sys/config/LINT @@ -2455,7 +2455,6 @@ options AHC_DUMP_EEPROM options CAM_DEBUG_DELAY options CLUSTERDEBUG options COMPAT_LINUX -options COMPAT_SUNOS options DEBUG options DEBUG_CRIT_SECTIONS options DEBUG_INTERRUPTS diff --git a/sys/config/LINT64 b/sys/config/LINT64 index 592caef32c..88a06761b2 100644 --- a/sys/config/LINT64 +++ b/sys/config/LINT64 @@ -2234,7 +2234,6 @@ options AHC_DUMP_EEPROM options CAM_DEBUG_DELAY options CLUSTERDEBUG #options COMPAT_LINUX -options COMPAT_SUNOS options DEBUG options DEBUG_CRIT_SECTIONS options DEBUG_INTERRUPTS diff --git a/sys/dev/misc/nmdm/nmdm.c b/sys/dev/misc/nmdm/nmdm.c index f931a4c65f..c190502db1 100644 --- a/sys/dev/misc/nmdm/nmdm.c +++ b/sys/dev/misc/nmdm/nmdm.c @@ -46,7 +46,7 @@ #include "opt_compat.h" #include #include -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) #include #endif #include diff --git a/sys/dev/serial/cy/cy.c b/sys/dev/serial/cy/cy.c index 515e72ab97..7451991cc2 100644 --- a/sys/dev/serial/cy/cy.c +++ b/sys/dev/serial/cy/cy.c @@ -1524,7 +1524,7 @@ sioioctl(struct dev_ioctl_args *ap) int error; int mynor; struct tty *tp; -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) int oldcmd; struct termios term; #endif @@ -1574,7 +1574,7 @@ sioioctl(struct dev_ioctl_args *ap) } } tp = com->tp; -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) term = tp->t_termios; oldcmd = cmd; error = ttsetcompat(tp, &cmd, data, &term); diff --git a/sys/dev/serial/digi/digi.c b/sys/dev/serial/digi/digi.c index 6dccae5dc9..902d3fc6d6 100644 --- a/sys/dev/serial/digi/digi.c +++ b/sys/dev/serial/digi/digi.c @@ -1091,7 +1091,7 @@ digiioctl(struct dev_ioctl_args *ap) struct digi_softc *sc; struct digi_p *port; struct tty *tp; -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) int oldcmd; struct termios term; #endif @@ -1272,7 +1272,7 @@ digiioctl(struct dev_ioctl_args *ap) } tp = port->tp; -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) term = tp->t_termios; oldcmd = cmd; error = ttsetcompat(tp, &cmd, data, &term); diff --git a/sys/dev/serial/rp/rp.c b/sys/dev/serial/rp/rp.c index 1812337211..eb474c1a21 100644 --- a/sys/dev/serial/rp/rp.c +++ b/sys/dev/serial/rp/rp.c @@ -1315,7 +1315,7 @@ rpioctl(struct dev_ioctl_args *ap) tp = rp->rp_tty; -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) term = tp->t_termios; oldcmd = cmd; error = ttsetcompat(tp, &cmd, data, &term); diff --git a/sys/dev/serial/si/si.c b/sys/dev/serial/si/si.c index d806322c98..48ed1ffb72 100644 --- a/sys/dev/serial/si/si.c +++ b/sys/dev/serial/si/si.c @@ -46,7 +46,7 @@ static const char si_copyright1[] = "@(#) Copyright (C) Specialix International #include #include -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) #include #endif #include diff --git a/sys/dev/serial/sio/sio.c b/sys/dev/serial/sio/sio.c index f6f742a627..f31cc03a90 100644 --- a/sys/dev/serial/sio/sio.c +++ b/sys/dev/serial/sio/sio.c @@ -2010,7 +2010,7 @@ sioioctl(struct dev_ioctl_args *ap) int error; int mynor; struct tty *tp; -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) u_long oldcmd; struct termios term; #endif @@ -2062,7 +2062,7 @@ sioioctl(struct dev_ioctl_args *ap) } } tp = com->tp; -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) term = tp->t_termios; oldcmd = ap->a_cmd; error = ttsetcompat(tp, &ap->a_cmd, data, &term); diff --git a/sys/dev/serial/stl/stallion.c b/sys/dev/serial/stl/stallion.c index 7a41481d8e..c46aa662d1 100644 --- a/sys/dev/serial/stl/stallion.c +++ b/sys/dev/serial/stl/stallion.c @@ -1131,7 +1131,7 @@ static int stlioctl(struct dev_ioctl_args *ap) /* * Deal with 4.3 compatibility issues if we have too... */ -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) if (1) { struct termios tios; unsigned long oldcmd; diff --git a/sys/emulation/linux/linux_misc.c b/sys/emulation/linux/linux_misc.c index 1d304e4644..74dcd069a9 100644 --- a/sys/emulation/linux/linux_misc.c +++ b/sys/emulation/linux/linux_misc.c @@ -1646,7 +1646,7 @@ sys_linux_reboot(struct linux_reboot_args *args) /* * The FreeBSD native getpid(2), getgid(2) and getuid(2) also modify - * p->p_retval[1] when COMPAT_43 or COMPAT_SUNOS is defined. This + * p->p_retval[1] when COMPAT_43 is defined. This * globbers registers that are assumed to be preserved. The following * lightweight syscalls fixes this. See also linux_getgid16() and * linux_getuid16() in linux_uid16.c. diff --git a/sys/emulation/linux/linux_uid16.c b/sys/emulation/linux/linux_uid16.c index 77664d0b26..f1c0bb93bf 100644 --- a/sys/emulation/linux/linux_uid16.c +++ b/sys/emulation/linux/linux_uid16.c @@ -24,7 +24,6 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/compat/linux/linux_uid16.c,v 1.4.2.1 2001/10/21 03:57:35 marcel Exp $ - * $DragonFly: src/sys/emulation/linux/linux_uid16.c,v 1.12 2006/12/23 00:27:02 swildner Exp $ */ #include "opt_compat.h" @@ -228,7 +227,7 @@ sys_linux_getgroups16(struct linux_getgroups16_args *args) /* * The FreeBSD native getgid(2) and getuid(2) also modify p->p_retval[1] - * when COMPAT_43 or COMPAT_SUNOS is defined. This globbers registers that + * when COMPAT_43 is defined. This globbers registers that * are assumed to be preserved. The following lightweight syscalls fixes * this. See also linux_getpid(2), linux_getgid(2) and linux_getuid(2) in * linux_misc.c diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index b125aa0a58..73233634bc 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -71,7 +71,7 @@ sys_getpid(struct getpid_args *uap) struct proc *p = curproc; uap->sysmsg_fds[0] = p->p_pid; -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) lwkt_gettoken(&proc_token); uap->sysmsg_fds[1] = p->p_pptr->p_pid; lwkt_reltoken(&proc_token); @@ -184,7 +184,7 @@ sys_getuid(struct getuid_args *uap) struct ucred *cred = curthread->td_ucred; uap->sysmsg_fds[0] = cred->cr_ruid; -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) uap->sysmsg_fds[1] = cred->cr_uid; #endif return (0); @@ -215,7 +215,7 @@ sys_getgid(struct getgid_args *uap) struct ucred *cred = curthread->td_ucred; uap->sysmsg_fds[0] = cred->cr_rgid; -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) uap->sysmsg_fds[1] = cred->cr_groups[0]; #endif return (0); diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 551e444b5a..45a723292e 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -81,7 +81,7 @@ #include #include #include -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) #include #endif #include @@ -885,7 +885,7 @@ ttioctl(struct tty *tp, u_long cmd, void *data, int flag) case TIOCSTI: case TIOCSTOP: case TIOCSWINSZ: -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) case TIOCLBIC: case TIOCLBIS: case TIOCLSET: @@ -1307,15 +1307,12 @@ ttioctl(struct tty *tp, u_long cmd, void *data, int flag) *(int *)data = tp->t_timeout / hz; break; default: -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) lwkt_reltoken(&p->p_token); lwkt_reltoken(&proc_token); lwkt_reltoken(&tty_token); +#if defined(COMPAT_43) return (ttcompat(tp, cmd, data, flag)); #else - lwkt_reltoken(&p->p_token); - lwkt_reltoken(&proc_token); - lwkt_reltoken(&tty_token); return (ENOIOCTL); #endif } diff --git a/sys/kern/tty_compat.c b/sys/kern/tty_compat.c index 52f4e69233..4ed993d32c 100644 --- a/sys/kern/tty_compat.c +++ b/sys/kern/tty_compat.c @@ -32,7 +32,6 @@ * * @(#)tty_compat.c 8.1 (Berkeley) 6/10/93 * $FreeBSD: src/sys/kern/tty_compat.c,v 1.29 1999/08/28 00:46:20 peter Exp $ - * $DragonFly: src/sys/kern/tty_compat.c,v 1.6 2006/12/23 23:47:54 swildner Exp $ */ #include "opt_compat.h" @@ -40,7 +39,7 @@ /* * mapping routines for old line discipline (yuck) */ -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) #include #include @@ -474,4 +473,4 @@ ttcompatsetlflags(struct tty *tp, struct termios *t) t->c_lflag = lflag; t->c_cflag = cflag; } -#endif /* COMPAT_43 || COMPAT_SUNOS */ +#endif /* COMPAT_43 */ diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c index b8966f8c4b..575b3388c6 100644 --- a/sys/kern/tty_pty.c +++ b/sys/kern/tty_pty.c @@ -53,7 +53,7 @@ #include #include -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(COMPAT_43) #include #endif #include @@ -1241,8 +1241,6 @@ ptyioctl(struct dev_ioctl_args *ap) #ifdef COMPAT_43 case TIOCSETP: case TIOCSETN: -#endif -#if defined(COMPAT_43) || defined(COMPAT_SUNOS) case TIOCSETC: case TIOCSLTC: case TIOCLBIS: diff --git a/sys/sys/ioctl.h b/sys/sys/ioctl.h index 9d531dec8d..891bb36371 100644 --- a/sys/sys/ioctl.h +++ b/sys/sys/ioctl.h @@ -37,7 +37,6 @@ * * @(#)ioctl.h 8.6 (Berkeley) 3/28/94 * $FreeBSD: src/sys/sys/ioctl.h,v 1.9 1999/12/29 04:24:43 peter Exp $ - * $DragonFly: src/sys/sys/ioctl.h,v 1.2 2003/06/17 04:28:58 dillon Exp $ */ #ifndef _SYS_IOCTL_H_ @@ -75,8 +74,8 @@ struct ttysize { * Compatibility with old terminal driver * * Source level -> #define USE_OLD_TTY - * Kernel level -> options COMPAT_43 or COMPAT_SUNOS + * Kernel level -> options COMPAT_43 */ -#if defined(USE_OLD_TTY) || defined(COMPAT_43) || defined(COMPAT_SUNOS) +#if defined(USE_OLD_TTY) || defined(COMPAT_43) #include #endif diff --git a/sys/sys/signal.h b/sys/sys/signal.h index dd8ab581f7..97f8e0b41c 100644 --- a/sys/sys/signal.h +++ b/sys/sys/signal.h @@ -290,9 +290,6 @@ struct sigaction { #define SA_NODEFER 0x0010 /* don't mask the signal we're delivering */ #define SA_NOCLDWAIT 0x0020 /* don't keep zombies around */ #define SA_SIGINFO 0x0040 /* signal handler with SA_SIGINFO args */ -#ifdef COMPAT_SUNOS -#define SA_USERTRAMP 0x0100 /* do not bounce off kernel's sigtramp */ -#endif #define NSIG 64 /* size of sigptbl */ diff --git a/usr.sbin/ac/ac.8 b/usr.sbin/ac/ac.8 index ce2577feb4..aa605049c5 100644 --- a/usr.sbin/ac/ac.8 +++ b/usr.sbin/ac/ac.8 @@ -68,8 +68,7 @@ Display the connect times in 24 hour chunks. .\" as the name of the device that local X sessions (ut_host of ":0.0") .\" originate from. If any login has been recorded on .\" .Ar console -.\" then these X sessions are ignored unless COMPAT_SUNOS was defined at -.\" compile time. +.\" then these X sessions are ignored. .It Fl p Print individual users' totals. .It Fl t Ar tty @@ -131,23 +130,3 @@ connect time accounting file .Xr utmp 5 , .Xr init 8 , .Xr sa 8 -.\" .Sh NOTES -.\" If COMPAT_SUNOS is defined -.\" .Nm ac -.\" ignores the fact that entries with ut_host of ":0.0" are not real -.\" login sessions. Normally such entries are ignored except in the case -.\" of a user being logged in when the -.\" .Pa wtmp -.\" file was rotated, in which case a login with ut_host of ":0.0" may -.\" appear without any preceding console logins. -.\" If no one is logged in on the console, the user is deemed to have -.\" logged in on at the earliest time stamp found in -.\" .Pa wtmp . -.\" Use of -.\" .Pa console -.\" allows -.\" .Nm ac -.\" to identify and correctly process a logout for the user. The default -.\" value for -.\" .Pa console -.\" is usually correct at compile time. -- 2.41.0