diff options
author | yokota <yokota@FreeBSD.org> | 1999-06-22 14:14:06 +0000 |
---|---|---|
committer | yokota <yokota@FreeBSD.org> | 1999-06-22 14:14:06 +0000 |
commit | 4f4eb0cfe54e001639240b3b63551c42280cdcc0 (patch) | |
tree | 75738e04df5c55c7d14fd6fb083ab1062bd92a85 /sys/kern/tty_cons.c | |
parent | d252fb51781d3bcdc1697ebd89678c9a00d94124 (diff) | |
download | FreeBSD-src-4f4eb0cfe54e001639240b3b63551c42280cdcc0.zip FreeBSD-src-4f4eb0cfe54e001639240b3b63551c42280cdcc0.tar.gz |
The second phase of syscons reorganization.
- Split syscons source code into manageable chunks and reorganize
some of complicated functions.
- Many static variables are moved to the softc structure.
- Added a new key function, PREV. When this key is pressed, the vty
immediately before the current vty will become foreground. Analogue
to PREV, which is usually assigned to the PrntScrn key.
PR: kern/10113
Submitted by: Christian Weisgerber <naddy@mips.rhein-neckar.de>
- Modified the kernel console input function sccngetc() so that it
handles function keys properly.
- Reorganized the screen update routine.
- VT switching code is reorganized. It now should be slightly more
robust than before.
- Added the DEVICE_RESUME function so that syscons no longer hooks the
APM resume event directly.
- New kernel configuration options: SC_NO_CUTPASTE, SC_NO_FONT_LOADING,
SC_NO_HISTORY and SC_NO_SYSMOUSE.
Various parts of syscons can be omitted so that the kernel size is
reduced.
SC_PIXEL_MODE
Made the VESA 800x600 mode an option, rather than a standard part of
syscons.
SC_DISABLE_DDBKEY
Disables the `debug' key combination.
SC_ALT_MOUSE_IMAGE
Inverse the character cell at the mouse cursor position in the text
console, rather than drawing an arrow on the screen.
Submitted by: Nick Hibma (n_hibma@FreeBSD.ORG)
SC_DFLT_FONT
makeoptions "SC_DFLT_FONT=_font_name_"
Include the named font as the default font of syscons. 16-line,
14-line and 8-line font data will be compiled in. This option replaces
the existing STD8X16FONT option, which loads 16-line font data only.
- The VGA driver is split into /sys/dev/fb/vga.c and /sys/isa/vga_isa.c.
- The video driver provides a set of ioctl commands to manipulate the
frame buffer.
- New kernel configuration option: VGA_WIDTH90
Enables 90 column modes: 90x25, 90x30, 90x43, 90x50, 90x60. These
modes are mot always supported by the video card.
PR: i386/7510
Submitted by: kbyanc@freedomnet.com and alexv@sui.gda.itesm.mx.
- The header file machine/console.h is reorganized; its contents is now
split into sys/fbio.h, sys/kbio.h (a new file) and sys/consio.h
(another new file). machine/console.h is still maintained for
compatibility reasons.
- Kernel console selection/installation routines are fixed and
slightly rebumped so that it should now be possible to switch between
the interanl kernel console (sc or vt) and a remote kernel console
(sio) again, as it was in 2.x, 3.0 and 3.1.
- Screen savers and splash screen decoders
Because of the header file reorganization described above, screen
savers and splash screen decoders are slightly modified. After this
update, /sys/modules/syscons/saver.h is no longer necessary and is
removed.
Diffstat (limited to 'sys/kern/tty_cons.c')
-rw-r--r-- | sys/kern/tty_cons.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/sys/kern/tty_cons.c b/sys/kern/tty_cons.c index acc8503..cee6564 100644 --- a/sys/kern/tty_cons.c +++ b/sys/kern/tty_cons.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * from: @(#)cons.c 7.2 (Berkeley) 5/9/91 - * $Id: cons.c,v 1.66 1999/05/30 16:52:03 phk Exp $ + * $Id: cons.c,v 1.67 1999/05/31 11:25:41 phk Exp $ */ #include "opt_devfs.h" @@ -109,19 +109,19 @@ static struct tty *cn_tp; /* physical console tty struct */ static void *cn_devfs_token; /* represents the devfs entry */ #endif /* DEVFS */ -CONS_DRIVER(cons, NULL, NULL, NULL, NULL, NULL); +CONS_DRIVER(cons, NULL, NULL, NULL, NULL, NULL, NULL); void cninit() { struct consdev *best_cp, *cp; - struct consdev **list; + const struct consdev **list; /* * Find the first console with the highest priority. */ best_cp = NULL; - list = (struct consdev **)cons_set.ls_items; + list = (const struct consdev **)cons_set.ls_items; while ((cp = *list++) != NULL) { if (cp->cn_probe == NULL) continue; @@ -147,6 +147,8 @@ cninit() * If no console, give up. */ if (best_cp == NULL) { + if (cn_tab != NULL && cn_tab->cn_term != NULL) + (*cn_tab->cn_term)(cn_tab); cn_tab = best_cp; return; } @@ -154,10 +156,13 @@ cninit() /* * Initialize console, then attach to it. This ordering allows * debugging using the previous console, if any. - * XXX if there was a previous console, then its driver should - * be informed when we forget about it. */ (*best_cp->cn_init)(best_cp); + if (cn_tab != NULL && cn_tab != best_cp) { + /* Turn off the previous console. */ + if (cn_tab->cn_term != NULL) + (*cn_tab->cn_term)(cn_tab); + } cn_tab = best_cp; } |