Deleted Added
full compact
syscons.c (105310) syscons.c (109623)
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 *
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 105310 2002-10-17 05:48:56Z kbyanc $
28 * $FreeBSD: head/sys/dev/syscons/syscons.c 109623 2003-01-21 08:56:16Z alfred $
29 */
30
31#include "opt_syscons.h"
32#include "opt_splash.h"
33#include "opt_ddb.h"
34
35#include <sys/param.h>
36#include <sys/systm.h>

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

313 scmeminit(NULL);
314
315 scinit(unit, flags);
316
317 if (sc_console->tsw->te_size > 0) {
318 /* assert(sc_console->ts != NULL); */
319 kernel_console_ts = sc_console->ts;
320 sc_console->ts = malloc(sc_console->tsw->te_size,
29 */
30
31#include "opt_syscons.h"
32#include "opt_splash.h"
33#include "opt_ddb.h"
34
35#include <sys/param.h>
36#include <sys/systm.h>

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

313 scmeminit(NULL);
314
315 scinit(unit, flags);
316
317 if (sc_console->tsw->te_size > 0) {
318 /* assert(sc_console->ts != NULL); */
319 kernel_console_ts = sc_console->ts;
320 sc_console->ts = malloc(sc_console->tsw->te_size,
321 M_DEVBUF, M_WAITOK);
321 M_DEVBUF, 0);
322 bcopy(kernel_console_ts, sc_console->ts, sc_console->tsw->te_size);
323 (*sc_console->tsw->te_default_attr)(sc_console,
324 user_default.std_color,
325 user_default.rev_color);
326 }
327 } else {
328 scinit(unit, flags);
329 }

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

2669
2670#ifndef SC_NO_FONT_LOADING
2671 if (flags & SC_KERNEL_CONSOLE) {
2672 sc->font_8 = font_8;
2673 sc->font_14 = font_14;
2674 sc->font_16 = font_16;
2675 } else if (sc->font_8 == NULL) {
2676 /* assert(sc_malloc) */
322 bcopy(kernel_console_ts, sc_console->ts, sc_console->tsw->te_size);
323 (*sc_console->tsw->te_default_attr)(sc_console,
324 user_default.std_color,
325 user_default.rev_color);
326 }
327 } else {
328 scinit(unit, flags);
329 }

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

2669
2670#ifndef SC_NO_FONT_LOADING
2671 if (flags & SC_KERNEL_CONSOLE) {
2672 sc->font_8 = font_8;
2673 sc->font_14 = font_14;
2674 sc->font_16 = font_16;
2675 } else if (sc->font_8 == NULL) {
2676 /* assert(sc_malloc) */
2677 sc->font_8 = malloc(sizeof(font_8), M_DEVBUF, M_WAITOK);
2678 sc->font_14 = malloc(sizeof(font_14), M_DEVBUF, M_WAITOK);
2679 sc->font_16 = malloc(sizeof(font_16), M_DEVBUF, M_WAITOK);
2677 sc->font_8 = malloc(sizeof(font_8), M_DEVBUF, 0);
2678 sc->font_14 = malloc(sizeof(font_14), M_DEVBUF, 0);
2679 sc->font_16 = malloc(sizeof(font_16), M_DEVBUF, 0);
2680 }
2681#endif
2682
2683 /* extract the hardware cursor location and hide the cursor for now */
2684 (*vidsw[sc->adapter]->read_hw_cursor)(sc->adp, &col, &row);
2685 (*vidsw[sc->adapter]->set_hw_cursor)(sc->adp, -1, -1);
2686
2687 /* set up the first console */

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

2698 (void *)sc_buffer, FALSE);
2699 if (sc_init_emulator(scp, SC_DFLT_TERM))
2700 sc_init_emulator(scp, "*");
2701 (*scp->tsw->te_default_attr)(scp,
2702 kernel_default.std_color,
2703 kernel_default.rev_color);
2704 } else {
2705 /* assert(sc_malloc) */
2680 }
2681#endif
2682
2683 /* extract the hardware cursor location and hide the cursor for now */
2684 (*vidsw[sc->adapter]->read_hw_cursor)(sc->adp, &col, &row);
2685 (*vidsw[sc->adapter]->set_hw_cursor)(sc->adp, -1, -1);
2686
2687 /* set up the first console */

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

2698 (void *)sc_buffer, FALSE);
2699 if (sc_init_emulator(scp, SC_DFLT_TERM))
2700 sc_init_emulator(scp, "*");
2701 (*scp->tsw->te_default_attr)(scp,
2702 kernel_default.std_color,
2703 kernel_default.rev_color);
2704 } else {
2705 /* assert(sc_malloc) */
2706 sc->dev = malloc(sizeof(dev_t)*sc->vtys, M_DEVBUF, M_WAITOK|M_ZERO);
2706 sc->dev = malloc(sizeof(dev_t)*sc->vtys, M_DEVBUF, M_ZERO);
2707 sc->dev[0] = makedev(CDEV_MAJOR, unit*MAXCONS);
2708 sc->dev[0]->si_tty = ttymalloc(sc->dev[0]->si_tty);
2709 scp = alloc_scp(sc, sc->first_vty);
2710 }
2711 SC_STAT(sc->dev[0]) = scp;
2712 sc->cur_scp = scp;
2713
2714 /* copy screen to temporary buffer */

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

2923
2924static scr_stat
2925*alloc_scp(sc_softc_t *sc, int vty)
2926{
2927 scr_stat *scp;
2928
2929 /* assert(sc_malloc) */
2930
2707 sc->dev[0] = makedev(CDEV_MAJOR, unit*MAXCONS);
2708 sc->dev[0]->si_tty = ttymalloc(sc->dev[0]->si_tty);
2709 scp = alloc_scp(sc, sc->first_vty);
2710 }
2711 SC_STAT(sc->dev[0]) = scp;
2712 sc->cur_scp = scp;
2713
2714 /* copy screen to temporary buffer */

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

2923
2924static scr_stat
2925*alloc_scp(sc_softc_t *sc, int vty)
2926{
2927 scr_stat *scp;
2928
2929 /* assert(sc_malloc) */
2930
2931 scp = (scr_stat *)malloc(sizeof(scr_stat), M_DEVBUF, M_WAITOK);
2931 scp = (scr_stat *)malloc(sizeof(scr_stat), M_DEVBUF, 0);
2932 init_scp(sc, vty, scp);
2933
2934 sc_alloc_scr_buffer(scp, TRUE, TRUE);
2935 if (sc_init_emulator(scp, SC_DFLT_TERM))
2936 sc_init_emulator(scp, "*");
2937
2938#ifndef SC_NO_CUTPASTE
2939 sc_alloc_cut_buffer(scp, TRUE);

--- 635 unchanged lines hidden ---
2932 init_scp(sc, vty, scp);
2933
2934 sc_alloc_scr_buffer(scp, TRUE, TRUE);
2935 if (sc_init_emulator(scp, SC_DFLT_TERM))
2936 sc_init_emulator(scp, "*");
2937
2938#ifndef SC_NO_CUTPASTE
2939 sc_alloc_cut_buffer(scp, TRUE);

--- 635 unchanged lines hidden ---