Deleted Added
full compact
sysmouse.c (74810) sysmouse.c (79344)
1/*-
2 * Copyright (c) 1999 Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 1999 Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/dev/syscons/sysmouse.c 74810 2001-03-26 12:41:29Z phk $
26 * $FreeBSD: head/sys/dev/syscons/sysmouse.c 79344 2001-07-06 03:24:40Z yokota $
27 */
28
29#include "opt_syscons.h"
30
31#include <sys/param.h>
32#include <sys/systm.h>
33#include <sys/conf.h>
34#include <sys/tty.h>

--- 46 unchanged lines hidden (view full) ---

81
82#if 0
83 if (SC_VTY(dev) != SC_MOUSE)
84 return ENXIO;
85#endif
86
87 tp = dev->si_tty = ttymalloc(dev->si_tty);
88 if (!(tp->t_state & TS_ISOPEN)) {
27 */
28
29#include "opt_syscons.h"
30
31#include <sys/param.h>
32#include <sys/systm.h>
33#include <sys/conf.h>
34#include <sys/tty.h>

--- 46 unchanged lines hidden (view full) ---

81
82#if 0
83 if (SC_VTY(dev) != SC_MOUSE)
84 return ENXIO;
85#endif
86
87 tp = dev->si_tty = ttymalloc(dev->si_tty);
88 if (!(tp->t_state & TS_ISOPEN)) {
89 sysmouse_tty = tp;
89 tp->t_oproc = smstart;
90 tp->t_param = smparam;
91 tp->t_stop = nottystop;
92 tp->t_dev = dev;
93 ttychars(tp);
94 tp->t_iflag = TTYDEF_IFLAG;
95 tp->t_oflag = TTYDEF_OFLAG;
96 tp->t_cflag = TTYDEF_CFLAG;

--- 152 unchanged lines hidden (view full) ---

249
250static void
251sm_attach_mouse(void *unused)
252{
253 dev_t dev;
254
255 dev = make_dev(&sm_cdevsw, SC_MOUSE, UID_ROOT, GID_WHEEL, 0600,
256 "sysmouse");
90 tp->t_oproc = smstart;
91 tp->t_param = smparam;
92 tp->t_stop = nottystop;
93 tp->t_dev = dev;
94 ttychars(tp);
95 tp->t_iflag = TTYDEF_IFLAG;
96 tp->t_oflag = TTYDEF_OFLAG;
97 tp->t_cflag = TTYDEF_CFLAG;

--- 152 unchanged lines hidden (view full) ---

250
251static void
252sm_attach_mouse(void *unused)
253{
254 dev_t dev;
255
256 dev = make_dev(&sm_cdevsw, SC_MOUSE, UID_ROOT, GID_WHEEL, 0600,
257 "sysmouse");
257 dev->si_tty = sysmouse_tty = ttymalloc(sysmouse_tty);
258 /* sysmouse doesn't have scr_stat */
259}
260
261SYSINIT(sysmouse, SI_SUB_DRIVERS, SI_ORDER_MIDDLE + CDEV_MAJOR,
262 sm_attach_mouse, NULL)
263
264int
265sysmouse_event(mouse_info_t *info)

--- 74 unchanged lines hidden ---
258 /* sysmouse doesn't have scr_stat */
259}
260
261SYSINIT(sysmouse, SI_SUB_DRIVERS, SI_ORDER_MIDDLE + CDEV_MAJOR,
262 sm_attach_mouse, NULL)
263
264int
265sysmouse_event(mouse_info_t *info)

--- 74 unchanged lines hidden ---