diff options
author | Aaron Campbell <aaron@cvs.openbsd.org> | 2001-03-07 17:51:30 +0000 |
---|---|---|
committer | Aaron Campbell <aaron@cvs.openbsd.org> | 2001-03-07 17:51:30 +0000 |
commit | 1ff36962a93da3f7d03d632a384e09f3ecaae773 (patch) | |
tree | 48939137a14ddfdadd35d69a73bf240378b136b6 | |
parent | 579ecba2cd190faf6de6fad2365910222c6e6c4a (diff) |
Instead of panic'ing when an ESC is found in kernel output, print a warning
and ignore it; from NetBSD.
-rw-r--r-- | sys/dev/wscons/wsemul_sun.c | 12 | ||||
-rw-r--r-- | sys/dev/wscons/wsemul_vt100.c | 12 |
2 files changed, 14 insertions, 10 deletions
diff --git a/sys/dev/wscons/wsemul_sun.c b/sys/dev/wscons/wsemul_sun.c index 7adac84957c..524bd5b8fe3 100644 --- a/sys/dev/wscons/wsemul_sun.c +++ b/sys/dev/wscons/wsemul_sun.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsemul_sun.c,v 1.1 2000/05/16 23:49:11 mickey Exp $ */ +/* $OpenBSD: wsemul_sun.c,v 1.2 2001/03/07 17:51:29 aaron Exp $ */ /* $NetBSD: wsemul_sun.c,v 1.11 2000/01/05 11:19:36 drochner Exp $ */ /* @@ -270,10 +270,12 @@ 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; diff --git a/sys/dev/wscons/wsemul_vt100.c b/sys/dev/wscons/wsemul_vt100.c index a89d71647a1..77023084a2a 100644 --- a/sys/dev/wscons/wsemul_vt100.c +++ b/sys/dev/wscons/wsemul_vt100.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsemul_vt100.c,v 1.4 2001/02/20 05:40:23 deraadt Exp $ */ +/* $OpenBSD: wsemul_vt100.c,v 1.5 2001/03/07 17:51:29 aaron Exp $ */ /* $NetBSD: wsemul_vt100.c,v 1.13 2000/04/28 21:56:16 mycroft Exp $ */ /* @@ -396,10 +396,12 @@ 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; |