Subject: Re: wscons: "ESC in kernel output" triggers a panic?
To: Bang Jun-Young <bjy@mogua.org>
From: Jaromír <jdolecek@netbsd.org>
List: tech-kern
Date: 02/20/2001 10:54:37
Bang Jun-Young wrote:
> > #ifdef DIAGNOSTIC
> >                 if (kernel)
> >                         panic("ESC in kernel output");
> > #endif
>
> The kernel shouldn't depend on or expect any particular terminal type 
> to be used, so its purpose would be to prevent a kernel hacker from 
> inserting escape sequences into kernel messages by mistake.

BTW, this panic() annoyed me a bit lately, when I was debugging
something and the result strings contained ESC. I changed
my source to

#ifdef DIAGNOSTIC
		if (kernel) {
			printf("ESC in kernel output\n");
			break;	/* ignore the ESC */
		}
#endif

which I think is more appropriate. This thing is not fatal nor
interesting enough to force dropping to DDB.

Jaromir
-- 
Jaromir Dolecek <jdolecek@NetBSD.org>      http://www.ics.muni.cz/~dolecek/
@@@@  Wanna a real operating system ? Go and get NetBSD, dammit!  @@@@