Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/wscons add function to detach wscons from a console....



details:   https://anonhg.NetBSD.org/src/rev/6c7247259bac
branches:  trunk
changeset: 326152:6c7247259bac
user:      mlelstv <mlelstv%NetBSD.org@localhost>
date:      Tue Jan 21 00:08:27 2014 +0000

description:
add function to detach wscons from a console. This allows to
switch the console to a different driver.

diffstat:

 sys/dev/wscons/wsdisplay.c    |  13 +++++++++++--
 sys/dev/wscons/wsdisplayvar.h |   3 ++-
 2 files changed, 13 insertions(+), 3 deletions(-)

diffs (51 lines):

diff -r 47b464069fb3 -r 6c7247259bac sys/dev/wscons/wsdisplay.c
--- a/sys/dev/wscons/wsdisplay.c        Mon Jan 20 22:02:32 2014 +0000
+++ b/sys/dev/wscons/wsdisplay.c        Tue Jan 21 00:08:27 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wsdisplay.c,v 1.135 2012/02/02 13:11:25 drochner Exp $ */
+/* $NetBSD: wsdisplay.c,v 1.136 2014/01/21 00:08:27 mlelstv Exp $ */
 
 /*
  * Copyright (c) 1996, 1997 Christopher G. Demetriou.  All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wsdisplay.c,v 1.135 2012/02/02 13:11:25 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsdisplay.c,v 1.136 2014/01/21 00:08:27 mlelstv Exp $");
 
 #include "opt_wsdisplay_compat.h"
 #include "opt_wsmsgattrs.h"
@@ -884,6 +884,15 @@
        wsdisplay_console_initted = 1;
 }
 
+void
+wsdisplay_cndetach(void)
+{
+       KASSERT(wsdisplay_console_initted == 2);
+
+       cn_tab = NULL;
+       wsdisplay_console_initted = 0;
+}
+
 /*
  * Tty and cdevsw functions.
  */
diff -r 47b464069fb3 -r 6c7247259bac sys/dev/wscons/wsdisplayvar.h
--- a/sys/dev/wscons/wsdisplayvar.h     Mon Jan 20 22:02:32 2014 +0000
+++ b/sys/dev/wscons/wsdisplayvar.h     Tue Jan 21 00:08:27 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wsdisplayvar.h,v 1.50 2013/01/31 10:57:30 macallan Exp $ */
+/* $NetBSD: wsdisplayvar.h,v 1.51 2014/01/21 00:08:27 mlelstv Exp $ */
 
 /*
  * Copyright (c) 1996, 1997 Christopher G. Demetriou.  All rights reserved.
@@ -163,6 +163,7 @@
             long);
 void   wsdisplay_preattach(const struct wsscreen_descr *, void *, int, int,
             long);
+void   wsdisplay_cndetach(void);
 
 int    wsdisplaydevprint(void *, const char *);
 int    wsemuldisplaydevprint(void *, const char *);



Home | Main Index | Thread Index | Old Index