Deleted Added
full compact
syscons.c (146478) syscons.c (146736)
1/*-
2 * Copyright (c) 1992-1998 S�ren Schmidt
3 * All rights reserved.
4 *
1/*-
2 * Copyright (c) 1992-1998 S�ren Schmidt
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to The DragonFly Project
6 * by Sascha Wildner <saw@online.de>
7 *
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 * notice, this list of conditions and the following disclaimer,
10 * without modification, immediately at the beginning of the file.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the

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

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
29#include <sys/cdefs.h>
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer,
13 * without modification, immediately at the beginning of the file.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the

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

25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31
32#include <sys/cdefs.h>
30__FBSDID("$FreeBSD: head/sys/dev/syscons/syscons.c 146478 2005-05-21 20:32:27Z marius $");
33__FBSDID("$FreeBSD: head/sys/dev/syscons/syscons.c 146736 2005-05-29 08:43:44Z delphij $");
31
32#include "opt_syscons.h"
33#include "opt_splash.h"
34#include "opt_ddb.h"
35
36#include <sys/param.h>
37#include <sys/systm.h>
38#include <sys/conf.h>

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

3037 scp->status & (GRAPHICS_MODE | PIXEL_MODE));
3038 if (rndr == NULL)
3039 return ENODEV;
3040 }
3041
3042 if (sw == scp->tsw) {
3043 error = (*sw->te_init)(scp, &scp->ts, SC_TE_WARM_INIT);
3044 scp->rndr = rndr;
34
35#include "opt_syscons.h"
36#include "opt_splash.h"
37#include "opt_ddb.h"
38
39#include <sys/param.h>
40#include <sys/systm.h>
41#include <sys/conf.h>

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

3040 scp->status & (GRAPHICS_MODE | PIXEL_MODE));
3041 if (rndr == NULL)
3042 return ENODEV;
3043 }
3044
3045 if (sw == scp->tsw) {
3046 error = (*sw->te_init)(scp, &scp->ts, SC_TE_WARM_INIT);
3047 scp->rndr = rndr;
3048 scp->rndr->init(scp);
3045 sc_clear_screen(scp);
3046 /* assert(error == 0); */
3047 return error;
3048 }
3049
3050 if (sc_malloc && (sw->te_size > 0))
3051 p = malloc(sw->te_size, M_DEVBUF, M_NOWAIT);
3052 else

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

3057
3058 if (scp->tsw)
3059 (*scp->tsw->te_term)(scp, &scp->ts);
3060 if (scp->ts != NULL)
3061 free(scp->ts, M_DEVBUF);
3062 scp->tsw = sw;
3063 scp->ts = p;
3064 scp->rndr = rndr;
3049 sc_clear_screen(scp);
3050 /* assert(error == 0); */
3051 return error;
3052 }
3053
3054 if (sc_malloc && (sw->te_size > 0))
3055 p = malloc(sw->te_size, M_DEVBUF, M_NOWAIT);
3056 else

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

3061
3062 if (scp->tsw)
3063 (*scp->tsw->te_term)(scp, &scp->ts);
3064 if (scp->ts != NULL)
3065 free(scp->ts, M_DEVBUF);
3066 scp->tsw = sw;
3067 scp->ts = p;
3068 scp->rndr = rndr;
3069 scp->rndr->init(scp);
3065
3066 /* XXX */
3067 (*sw->te_default_attr)(scp, user_default.std_color, user_default.rev_color);
3068 sc_clear_screen(scp);
3069
3070 return 0;
3071}
3072

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

3415 return 1;
3416
3417 /* if this vty is not currently showing, do nothing */
3418 if (scp != scp->sc->cur_scp)
3419 return 0;
3420
3421 /* setup video hardware for the given mode */
3422 (*vidsw[scp->sc->adapter]->set_mode)(scp->sc->adp, scp->mode);
3070
3071 /* XXX */
3072 (*sw->te_default_attr)(scp, user_default.std_color, user_default.rev_color);
3073 sc_clear_screen(scp);
3074
3075 return 0;
3076}
3077

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

3420 return 1;
3421
3422 /* if this vty is not currently showing, do nothing */
3423 if (scp != scp->sc->cur_scp)
3424 return 0;
3425
3426 /* setup video hardware for the given mode */
3427 (*vidsw[scp->sc->adapter]->set_mode)(scp->sc->adp, scp->mode);
3428 scp->rndr->init(scp);
3423#ifndef __sparc64__
3424 sc_vtb_init(&scp->scr, VTB_FRAMEBUFFER, scp->xsize, scp->ysize,
3425 (void *)scp->sc->adp->va_window, FALSE);
3426#endif
3427
3428#ifndef SC_NO_FONT_LOADING
3429 /* load appropriate font */
3430 if (!(scp->status & GRAPHICS_MODE)) {

--- 146 unchanged lines hidden ---
3429#ifndef __sparc64__
3430 sc_vtb_init(&scp->scr, VTB_FRAMEBUFFER, scp->xsize, scp->ysize,
3431 (void *)scp->sc->adp->va_window, FALSE);
3432#endif
3433
3434#ifndef SC_NO_FONT_LOADING
3435 /* load appropriate font */
3436 if (!(scp->status & GRAPHICS_MODE)) {

--- 146 unchanged lines hidden ---