diff options
author | phk <phk@FreeBSD.org> | 2004-10-14 08:58:28 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-10-14 08:58:28 +0000 |
commit | 735fb5416e3e9092eaeadc3c33ffb7645e0abc1c (patch) | |
tree | ff7a99203e47d65605977e07d267ec2eba64d08e /sys/dev/syscons/sysmouse.c | |
parent | ae8741cdf47d8a8579de263e2bb61e0f4401e1df (diff) | |
download | FreeBSD-src-735fb5416e3e9092eaeadc3c33ffb7645e0abc1c.zip FreeBSD-src-735fb5416e3e9092eaeadc3c33ffb7645e0abc1c.tar.gz |
Fix echo in console mode.
Diffstat (limited to 'sys/dev/syscons/sysmouse.c')
-rw-r--r-- | sys/dev/syscons/sysmouse.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/sys/dev/syscons/sysmouse.c b/sys/dev/syscons/sysmouse.c index ce8fe12..be4112c 100644 --- a/sys/dev/syscons/sysmouse.c +++ b/sys/dev/syscons/sysmouse.c @@ -78,13 +78,8 @@ smopen(struct cdev *dev, int flag, int mode, struct thread *td) return ENXIO; #endif - tp = dev->si_tty = ttymalloc(dev->si_tty); + tp = dev->si_tty; if (!(tp->t_state & TS_ISOPEN)) { - sysmouse_tty = tp; - tp->t_oproc = smstart; - tp->t_param = smparam; - tp->t_stop = nottystop; - tp->t_dev = dev; ttychars(tp); tp->t_iflag = TTYDEF_IFLAG; tp->t_oflag = TTYDEF_OFLAG; @@ -239,9 +234,17 @@ static void sm_attach_mouse(void *unused) { struct cdev *dev; + struct tty *tp; dev = make_dev(&sm_cdevsw, SC_MOUSE, UID_ROOT, GID_WHEEL, 0600, "sysmouse"); + dev->si_tty = tp = ttyalloc(); + tp->t_oproc = smstart; + tp->t_param = smparam; + tp->t_stop = nottystop; + tp->t_dev = dev; + + sysmouse_tty = tp; /* sysmouse doesn't have scr_stat */ } |