1/*- 2 * Copyright (c) 1992-1998 S�ren Schmidt 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 --- 11 unchanged lines hidden (view full) --- 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * |
28 * $FreeBSD: head/sys/dev/syscons/syscons.c 51654 1999-09-25 16:21:39Z phk $ |
29 */ 30 31#include "sc.h" 32#include "splash.h" 33#include "opt_syscons.h" 34#include "opt_ddb.h" 35#ifdef __i386__ 36#include "apm.h" --- 175 unchanged lines hidden (view full) --- 212static struct cdevsw sc_cdevsw = { 213 /* open */ scopen, 214 /* close */ scclose, 215 /* read */ scread, 216 /* write */ scwrite, 217 /* ioctl */ scioctl, 218 /* stop */ nostop, 219 /* reset */ noreset, |
220 /* devtotty */ nodevtotty, 221 /* poll */ ttypoll, |
222 /* mmap */ scmmap, 223 /* strategy */ nostrategy, 224 /* name */ "sc", 225 /* parms */ noparms, 226 /* maj */ CDEV_MAJOR, 227 /* dump */ nodump, 228 /* psize */ nopsize, 229 /* flags */ D_TTY, --- 206 unchanged lines hidden (view full) --- 436 sc_softc_t *sc; 437 438 sc = sc_get_softc(unit, (sc_console_unit == unit) ? SC_KERNEL_CONSOLE : 0); 439 if (sc->kbd != NULL) 440 kbd_clear_state(sc->kbd); 441 return 0; 442} 443 |
444static int 445scdevtounit(dev_t dev) 446{ 447 int vty = SC_VTY(dev); 448 449 if (vty == SC_CONSOLECTL) 450 return ((sc_console != NULL) ? sc_console->sc->unit : -1); 451 else if (vty == SC_MOUSE) --- 24 unchanged lines hidden (view full) --- 476#else 477 if (sc == NULL) 478#endif 479 return ENXIO; 480 481 tp = dev->si_tty = ttymalloc(dev->si_tty); 482 tp->t_oproc = (SC_VTY(dev) == SC_MOUSE) ? scmousestart : scstart; 483 tp->t_param = scparam; |
484 tp->t_stop = nostop; |
485 tp->t_dev = dev; 486 if (!(tp->t_state & TS_ISOPEN)) { 487 ttychars(tp); 488 /* Use the current setting of the <-- key as default VERASE. */ 489 /* If the Delete key is preferable, an stty is necessary */ 490 if (sc != NULL) { 491 key.keynum = KEYCODE_BS; 492 kbd_ioctl(sc->kbd, GIO_KEYMAPENT, (caddr_t)&key); --- 3564 unchanged lines hidden --- |