don't panic if there is ESC in kernel output, just print a warning and

ignore the ESC; also remove the #ifdef DIAGNOSTIC
This commit is contained in:
jdolecek 2001-02-21 23:12:58 +00:00
parent 5cb9412e0d
commit aceb9e23c9
2 changed files with 13 additions and 11 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: wsemul_sun.c,v 1.11 2000/01/05 11:19:36 drochner Exp $ */
/* $NetBSD: wsemul_sun.c,v 1.12 2001/02/21 23:12:58 jdolecek Exp $ */
/*
* Copyright (c) 1996, 1997 Christopher G. Demetriou. All rights reserved.
@ -33,7 +33,7 @@
/* XXX DESCRIPTION/SOURCE OF INFORMATION */
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: wsemul_sun.c,v 1.11 2000/01/05 11:19:36 drochner Exp $");
__KERNEL_RCSID(0, "$NetBSD: wsemul_sun.c,v 1.12 2001/02/21 23:12:58 jdolecek Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -272,10 +272,11 @@ wsemul_sun_output_normal(edp, c, kernel)
break;
case ASCII_ESC: /* "Escape (ESC)" */
#ifdef DIAGNOSTIC
if (kernel)
panic("ESC in kernel output");
#endif
if (kernel) {
printf("wsemul_sun_output_normal: ESC in kernel output ignored\n");
break; /* ignore the ESC */
}
if (edp->state == SUN_EMUL_STATE_NORMAL) {
newstate = SUN_EMUL_STATE_HAVEESC;
break;

View File

@ -1,4 +1,4 @@
/* $NetBSD: wsemul_vt100.c,v 1.13 2000/04/28 21:56:16 mycroft Exp $ */
/* $NetBSD: wsemul_vt100.c,v 1.14 2001/02/21 23:12:58 jdolecek Exp $ */
/*
* Copyright (c) 1998
@ -403,10 +403,11 @@ wsemul_vt100_output_c0c1(edp, c, kernel)
edp->chartab0 = 0;
break;
case ASCII_ESC:
#ifdef DIAGNOSTIC
if (kernel)
panic("ESC in kernel output");
#endif
if (kernel) {
printf("wsemul_vt100_output_c0c1: ESC in kernel output ignored\n");
break; /* ignore the ESC */
}
if (edp->state == VT100_EMUL_STATE_STRING) {
/* might be a string end */
edp->state = VT100_EMUL_STATE_STRING_ESC;