Module Name:    src
Committed By:   mlelstv
Date:           Tue Jan 21 00:08:28 UTC 2014

Modified Files:
        src/sys/dev/wscons: wsdisplay.c wsdisplayvar.h

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


To generate a diff of this commit:
cvs rdiff -u -r1.135 -r1.136 src/sys/dev/wscons/wsdisplay.c
cvs rdiff -u -r1.50 -r1.51 src/sys/dev/wscons/wsdisplayvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/wscons/wsdisplay.c
diff -u src/sys/dev/wscons/wsdisplay.c:1.135 src/sys/dev/wscons/wsdisplay.c:1.136
--- src/sys/dev/wscons/wsdisplay.c:1.135	Thu Feb  2 13:11:25 2012
+++ src/sys/dev/wscons/wsdisplay.c	Tue Jan 21 00:08:27 2014
@@ -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_preattach(const struct wsscree
 	wsdisplay_console_initted = 1;
 }
 
+void
+wsdisplay_cndetach(void)
+{
+	KASSERT(wsdisplay_console_initted == 2);
+
+	cn_tab = NULL;
+	wsdisplay_console_initted = 0;
+}
+
 /*
  * Tty and cdevsw functions.
  */

Index: src/sys/dev/wscons/wsdisplayvar.h
diff -u src/sys/dev/wscons/wsdisplayvar.h:1.50 src/sys/dev/wscons/wsdisplayvar.h:1.51
--- src/sys/dev/wscons/wsdisplayvar.h:1.50	Thu Jan 31 10:57:30 2013
+++ src/sys/dev/wscons/wsdisplayvar.h	Tue Jan 21 00:08:27 2014
@@ -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 @@ void	wsdisplay_cnattach(const struct wss
             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 *);

Reply via email to