Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/wscons Call cn_halt for old console in wsdisplay_pre...



details:   https://anonhg.NetBSD.org/src/rev/3f5c8c8543d6
branches:  trunk
changeset: 452812:3f5c8c8543d6
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Wed Jul 24 19:40:55 2019 +0000

description:
Call cn_halt for old console in wsdisplay_preattach too

diffstat:

 sys/dev/wscons/wsdisplay.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (31 lines):

diff -r f577bba71542 -r 3f5c8c8543d6 sys/dev/wscons/wsdisplay.c
--- a/sys/dev/wscons/wsdisplay.c        Wed Jul 24 19:37:52 2019 +0000
+++ b/sys/dev/wscons/wsdisplay.c        Wed Jul 24 19:40:55 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wsdisplay.c,v 1.156 2019/07/23 17:39:36 rin Exp $ */
+/* $NetBSD: wsdisplay.c,v 1.157 2019/07/24 19:40:55 jmcneill 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.156 2019/07/23 17:39:36 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsdisplay.c,v 1.157 2019/07/24 19:40:55 jmcneill Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_wsdisplay_compat.h"
@@ -974,8 +974,11 @@
                                                                  ccol, crow,
                                                                  defattr);
 
-       if (cn_tab != &wsdisplay_cons)
+       if (cn_tab != &wsdisplay_cons) {
+               if (cn_tab != NULL && cn_tab->cn_halt != NULL)
+                       cn_tab->cn_halt(cn_tab->cn_dev);
                wsdisplay_ocn = cn_tab;
+       }
        cn_tab = &wsdisplay_cons;
        wsdisplay_console_initted = 1;
 }



Home | Main Index | Thread Index | Old Index