version 1.275, 2017/10/25 08:12:39 |
version 1.275.2.4, 2018/09/06 06:56:42 |
Line 209 struct ttylist_head ttylist = TAILQ_HEAD |
|
Line 209 struct ttylist_head ttylist = TAILQ_HEAD |
|
int tty_count; |
int tty_count; |
kmutex_t tty_lock; |
kmutex_t tty_lock; |
krwlock_t ttcompat_lock; |
krwlock_t ttcompat_lock; |
int (*ttcompatvec)(struct tty *, u_long, void *, int, struct lwp *); |
int (*vec_compat_ttioctl_60)(dev_t, u_long, void *, int, struct lwp *) = NULL; |
|
int (*vec_compat_ptmioctl_60)(dev_t, u_long, void *, int, struct lwp *) = |
|
stub_compat_ptmioctl_60; |
|
|
|
struct ptm_pty *ptm = NULL; |
|
|
uint64_t tk_cancc; |
uint64_t tk_cancc; |
uint64_t tk_nin; |
uint64_t tk_nin; |
Line 302 sysctl_kern_tty_setup(void) |
|
Line 306 sysctl_kern_tty_setup(void) |
|
sysctl_createv(&kern_tkstat_sysctllog, 0, NULL, NULL, |
sysctl_createv(&kern_tkstat_sysctllog, 0, NULL, NULL, |
CTLFLAG_PERMANENT, |
CTLFLAG_PERMANENT, |
CTLTYPE_NODE, "tkstat", |
CTLTYPE_NODE, "tkstat", |
SYSCTL_DESCR("Number of characters sent and and " |
SYSCTL_DESCR("Number of characters sent and received " |
"received on ttys"), |
"on ttys"), |
NULL, 0, NULL, 0, |
NULL, 0, NULL, 0, |
CTL_KERN, KERN_TKSTAT, CTL_EOL); |
CTL_KERN, KERN_TKSTAT, CTL_EOL); |
|
|
Line 774 ttyinput_wlock(int c, struct tty *tp) |
|
Line 778 ttyinput_wlock(int c, struct tty *tp) |
|
/* |
/* |
* Place the cursor over the '^' of the ^D. |
* Place the cursor over the '^' of the ^D. |
*/ |
*/ |
i = min(2, tp->t_column - i); |
i = uimin(2, tp->t_column - i); |
while (i > 0) { |
while (i > 0) { |
(void)ttyoutput('\b', tp); |
(void)ttyoutput('\b', tp); |
i--; |
i--; |
Line 1408 ttioctl(struct tty *tp, u_long cmd, void |
|
Line 1412 ttioctl(struct tty *tp, u_long cmd, void |
|
default: |
default: |
break; |
break; |
} |
} |
#ifdef COMPAT_60 |
|
error = compat_60_ttioctl(tp, cmd, data, flag, l); |
|
if (error != EPASSTHROUGH) |
|
return error; |
|
#endif /* COMPAT_60 */ |
|
/* We may have to load the compat module for this. */ |
/* We may have to load the compat module for this. */ |
for (;;) { |
for (;;) { |
rw_enter(&ttcompat_lock, RW_READER); |
rw_enter(&ttcompat_lock, RW_READER); |
if (ttcompatvec != NULL) { |
if (vec_compat_ttioctl_60 != NULL) { |
break; |
break; |
} |
} |
rw_exit(&ttcompat_lock); |
rw_exit(&ttcompat_lock); |
(void)module_autoload("compat", MODULE_CLASS_ANY); |
(void)module_autoload("compat", MODULE_CLASS_EXEC); |
if (ttcompatvec == NULL) { |
if (vec_compat_ttioctl_60 == NULL) { |
return EPASSTHROUGH; |
return EPASSTHROUGH; |
} |
} |
} |
} |
error = (*ttcompatvec)(tp, cmd, data, flag, l); |
error = (*vec_compat_ttioctl_60)(tp->t_dev, cmd, data, flag, l); |
rw_exit(&ttcompat_lock); |
rw_exit(&ttcompat_lock); |
return error; |
return error; |
} |
} |
Line 2185 ttwrite(struct tty *tp, struct uio *uio, |
|
Line 2184 ttwrite(struct tty *tp, struct uio *uio, |
|
* leftover from last time. |
* leftover from last time. |
*/ |
*/ |
if (cc == 0) { |
if (cc == 0) { |
cc = min(uio->uio_resid, OBUFSIZ); |
cc = uimin(uio->uio_resid, OBUFSIZ); |
cp = obuf; |
cp = obuf; |
error = uiomove(cp, cc, uio); |
error = uiomove(cp, cc, uio); |
if (error) { |
if (error) { |
Line 3069 tty_try_xonxoff(struct tty *tp, unsigned |
|
Line 3068 tty_try_xonxoff(struct tty *tp, unsigned |
|
} |
} |
return EAGAIN; |
return EAGAIN; |
} |
} |
|
|
|
int |
|
stub_compat_ptmioctl_60(dev_t dev, u_long cmd, void *data, int flag, |
|
struct lwp *l) |
|
{ |
|
|
|
return EPASSTHROUGH; |
|
} |