summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2016-05-24 16:09:08 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2016-05-24 16:09:08 +0000
commitb144d536e745f2ec6197d3215e9fb20cbb952cdb (patch)
treed4897ea7b63411b5f8965d30ed659152b3826f0f /sys
parente36e3227e2c9ffbb3f1d5cb7578987abe0c5fef0 (diff)
Remove two sysctls which were introduced only for development of the
ptm/pty subsystem, and got left behind. ok beck
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/tty_pty.c26
-rw-r--r--sys/sys/tty.h10
2 files changed, 6 insertions, 30 deletions
diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c
index c151fc711b1..1f1f43880ee 100644
--- a/sys/kern/tty_pty.c
+++ b/sys/kern/tty_pty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty_pty.c,v 1.77 2016/03/19 12:04:15 natano Exp $ */
+/* $OpenBSD: tty_pty.c,v 1.78 2016/05/24 16:09:07 deraadt Exp $ */
/* $NetBSD: tty_pty.c,v 1.33.4.1 1996/06/02 09:08:11 mrg Exp $ */
/*
@@ -911,34 +911,10 @@ int
sysctl_pty(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp,
size_t newlen)
{
- int error, oldmax;
-
if (namelen != 1)
return (ENOTDIR);
switch (name[0]) {
- case KERN_TTY_MAXPTYS:
- if (!newp)
- return (sysctl_rdint(oldp, oldlenp, newp, maxptys));
- rw_enter_write(&pt_softc_lock);
- oldmax = maxptys;
- error = sysctl_int(oldp, oldlenp, newp, newlen, &maxptys);
- /*
- * We can't set the max lower than the current active
- * value or to a value bigger than NPTY_MAX.
- */
- if (error == 0 && (maxptys > NPTY_MAX || maxptys < npty)) {
- maxptys = oldmax;
- error = ERANGE;
- }
- rw_exit_write(&pt_softc_lock);
- return (error);
- case KERN_TTY_NPTYS:
- return (sysctl_rdint(oldp, oldlenp, newp, npty));
-#ifdef notyet
- case KERN_TTY_GID:
- return (sysctl_int(oldp, oldlenp, newp, newlen, &tty_gid));
-#endif
default:
return (EOPNOTSUPP);
}
diff --git a/sys/sys/tty.h b/sys/sys/tty.h
index 76975cccf0f..c562e02d8ad 100644
--- a/sys/sys/tty.h
+++ b/sys/sys/tty.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.h,v 1.36 2015/12/21 21:49:03 sf Exp $ */
+/* $OpenBSD: tty.h,v 1.37 2016/05/24 16:09:07 deraadt Exp $ */
/* $NetBSD: tty.h,v 1.30.4.1 1996/06/02 09:08:13 mrg Exp $ */
/*-
@@ -47,8 +47,8 @@
#define KERN_TTY_TKRAWCC 3 /* quad: input chars, raw mode */
#define KERN_TTY_TKCANCC 4 /* quad: input char, cooked mode */
#define KERN_TTY_INFO 5 /* struct: tty stats */
-#define KERN_TTY_MAXPTYS 6 /* int: max ptys */
-#define KERN_TTY_NPTYS 7 /* int: number of allocated ptys */
+/* was KERN_TTY_MAXPTYS 6 */
+/* was KERN_TTY_NPTYS 7 */
#define KERN_TTY_MAXID 8
#define CTL_KERN_TTY_NAMES { \
@@ -58,8 +58,8 @@
{ "tk_rawcc", CTLTYPE_QUAD }, \
{ "tk_cancc", CTLTYPE_QUAD }, \
{ "ttyinfo", CTLTYPE_STRUCT }, \
- { "maxptys", CTLTYPE_INT }, \
- { "nptys", CTLTYPE_INT }, \
+ { "gap", 0 }, \
+ { "gap", 0 }, \
}
/* ptmget, for /dev/ptm pty getting ioctl PTMGET */