Subject: config option DIAGNOSTIC is dysfunctional
To: None <netbsd-bugs@NetBSD.ORG>
From: Jim Howard <>
List: netbsd-bugs
Date: 10/09/1996 10:56:05
| This is #3 of 3 PRs rejected yesterday by gnats, presumably because they  |
| came from BETA.  I doubt anything has changed since BETA, so if this has, |
| please speak up!  ;)                                                      |

>Submitter-Id:	net
>Originator:	Jim Howard <>
>Confidential:	no
>Synopsis:	config option DIAGNOSTIC is dysfunctional
>Severity:	serious
>Priority:	medium
>Category:	kern
>Class:		sw-bug
>Release:	NetBSD/i386 1.2_BETA

There are numerous lines scattered throughout the kernel source that should
be enclosed by "#ifdef DIAGNOSTIC ... #endif", but are not.  These lines
print diagnostic error messages from the kernel on the screen.  Since this
output cannot be redirected like output from user-level processes, it will
trash the screen just about anywhere but on the command line.  The present
situation therefore qualifies as an infestation of bugs.  Furthermore, these
kernel messages are only of use when a problem cannot be diagnosed from
user-level messages and common sense; that's why the config option
DIAGNOSTIC exists.  The present situation therefore adds unnecessary size to
the kernel.  And many kernel complaints do not concern true errors (the
printer offline message comes to mind), in which case common sense is
actively foiled.

Well, a quick example:  mount a floppy drive with no disk in it.

Enclose all lines in the kernel that print diagnostic messages with "#ifdef
DIAGNOSTIC ... #endif".  The obvious exceptions are messages printed only
during bootup or shutdown (including fatal panics).  Since this will require
considerable and extensive effort now, but could have been dealt with long
since already by kernel maintainers, well, basically thanks to those
individuals are overdue for a hot poker up the rear.