diff options
| author | 2001-03-07 17:51:29 +0000 | |
|---|---|---|
| committer | 2001-03-07 17:51:29 +0000 | |
| commit | de1b10ba968b4a2622cd1493b48ae1cf2ae273a8 (patch) | |
| tree | b5b15b482585c7b92d87cb6dbecd2ab6aedc00a8 | |
| parent | Somehow I left my tsort there... (diff) | |
| download | wireguard-openbsd-de1b10ba968b4a2622cd1493b48ae1cf2ae273a8.tar.xz wireguard-openbsd-de1b10ba968b4a2622cd1493b48ae1cf2ae273a8.zip | |
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; |
