Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/wscons Remove KASSERT in wsdisplay_cndetach. The cal...
details: https://anonhg.NetBSD.org/src/rev/1249e9d57989
branches: trunk
changeset: 448322:1249e9d57989
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Wed Jan 30 02:43:47 2019 +0000
description:
Remove KASSERT in wsdisplay_cndetach. The caller likely doesn't know the
state of the console, so simply do cleanup if a previous console has been
attached.
diffstat:
sys/dev/wscons/wsdisplay.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diffs (35 lines):
diff -r 6d95dd3f53e9 -r 1249e9d57989 sys/dev/wscons/wsdisplay.c
--- a/sys/dev/wscons/wsdisplay.c Wed Jan 30 02:02:23 2019 +0000
+++ b/sys/dev/wscons/wsdisplay.c Wed Jan 30 02:43:47 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wsdisplay.c,v 1.149 2018/11/29 23:18:40 jmcneill Exp $ */
+/* $NetBSD: wsdisplay.c,v 1.150 2019/01/30 02:43:47 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.149 2018/11/29 23:18:40 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsdisplay.c,v 1.150 2019/01/30 02:43:47 jmcneill Exp $");
#ifdef _KERNEL_OPT
#include "opt_wsdisplay_compat.h"
@@ -966,10 +966,12 @@
void
wsdisplay_cndetach(void)
{
- KASSERT(wsdisplay_console_initted == 2);
-
- cn_tab = wsdisplay_ocn;
- wsdisplay_console_initted = 0;
+ if (wsdisplay_console_initted > 0) {
+ cn_tab = wsdisplay_ocn;
+ wsdisplay_console_initted = 0;
+ wsdisplay_console_attached = 0;
+ wsdisplay_console_device = NULL;
+ }
}
/*
Home |
Main Index |
Thread Index |
Old Index