Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/rcons Split off tty initialization in rcons_init() i...



details:   https://anonhg.NetBSD.org/src/rev/2334de15fb90
branches:  trunk
changeset: 483892:2334de15fb90
user:      pk <pk%NetBSD.org@localhost>
date:      Mon Mar 20 11:24:46 2000 +0000

description:
Split off tty initialization in rcons_init() into a separate routine
and get rid of `fbconstty'.

diffstat:

 sys/dev/rcons/rcons.h      |   3 ++-
 sys/dev/rcons/rcons_kern.c |  37 ++++++++++++++++++++++---------------
 2 files changed, 24 insertions(+), 16 deletions(-)

diffs (84 lines):

diff -r 72a7036b3046 -r 2334de15fb90 sys/dev/rcons/rcons.h
--- a/sys/dev/rcons/rcons.h     Mon Mar 20 11:03:42 2000 +0000
+++ b/sys/dev/rcons/rcons.h     Mon Mar 20 11:24:46 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rcons.h,v 1.9 1999/08/26 20:48:09 thorpej Exp $ */
+/*     $NetBSD: rcons.h,v 1.10 2000/03/20 11:24:46 pk Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -98,6 +98,7 @@
 void rcons_cnputc __P((int));
 void rcons_bell __P((struct rconsole *));
 void rcons_init __P((struct rconsole *, int));
+void rcons_ttyinit __P((struct tty *));
 
 /* rcons_subr.c */
 void rcons_init_ops __P((struct rconsole *rc));
diff -r 72a7036b3046 -r 2334de15fb90 sys/dev/rcons/rcons_kern.c
--- a/sys/dev/rcons/rcons_kern.c        Mon Mar 20 11:03:42 2000 +0000
+++ b/sys/dev/rcons/rcons_kern.c        Mon Mar 20 11:24:46 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rcons_kern.c,v 1.10 1999/05/23 17:59:40 ad Exp $ */
+/*     $NetBSD: rcons_kern.c,v 1.11 2000/03/20 11:24:46 pk Exp $ */
 
 /*
  * Copyright (c) 1991, 1993
@@ -55,8 +55,6 @@
 #include <dev/rcons/raster.h>
 #include <dev/rcons/rcons.h>
 
-extern struct tty *fbconstty;
-
 static void rcons_belltmr(void *);
 
 static struct rconsole *mydevicep; /* XXX */
@@ -175,18 +173,8 @@
        struct rconsole *rc;
        int clear;
 {
-       /* XXX this should go away */
-       struct winsize *ws;
-
        mydevicep = rc;
        
-       /* Let the system know how big the console is */
-       ws = &fbconstty->t_winsize;
-       ws->ws_row = rc->rc_maxrow;
-       ws->ws_col = rc->rc_maxcol;
-       ws->ws_xpixel = rc->rc_width;
-       ws->ws_ypixel = rc->rc_height;
-
        /* Initialize operations set, clear screen and turn cursor on */
        rcons_init_ops(rc);
        if (clear) {
@@ -195,8 +183,27 @@
                rcons_clear2eop(rc);
        }
        rcons_cursor(rc);
+}
+
+void
+rcons_ttyinit(tp)
+       struct tty *tp;
+{
+       /* XXX this should go away */
+       struct rconsole *rc = mydevicep;
+       struct winsize *ws;
+
+       if (rc == NULL)
+               return;
+
+       /* Let the system know how big the console is */
+       ws = &tp->t_winsize;
+       ws->ws_row = rc->rc_maxrow;
+       ws->ws_col = rc->rc_maxcol;
+       ws->ws_xpixel = rc->rc_width;
+       ws->ws_ypixel = rc->rc_height;
 
        /* Initialization done; hook us up */
-       fbconstty->t_oproc = rcons_output;
-       /*fbconstty->t_stop = (void (*)()) nullop;*/
+       tp->t_oproc = rcons_output;
+       /*tp->t_stop = (void (*)()) nullop;*/
 }



Home | Main Index | Thread Index | Old Index