Subject: Re: DAD verbosity
To: Darren Reed <>
From: Chris G. Demetriou <>
List: tech-kern
Date: 02/17/2000 17:02:28
Darren Reed <> writes:
> If it's important, then each line should have a prefix in the string.

what matt said.

take a look at the way the autoconfiguration code works, when printing
out info for an attached device.

to print a single "fooM at barN: information here" line, part of
that's printed by the generic autoconfig code, part is printed by the
parent bus code, part by the child device code.

you'd think you could make it simpler, e.g. have the "fooM at BarN" be
printed by the generic code, then have the child code print out "fooM:
information here", etc. as needed, but then what do you do with the
"FOOBARBAZ at BarN not configured" messages (where you _have_ to have
the parent bus print something), and i'm sure you could fix _that_
some way, but you'd have some other issue to deal with.

And that's just in the device configuration code!  8-)

Another interesting problem in the kernel are uses of logpri() and
addlog().  logpri() is pretty much guaranteed to cause potential
lossage, if you're worrying about locking.  addlog() may not, if it's
just used like printf() (and, amazingly, in some cases it is), but
when it's actually used as intended (grep around you'll find some) you
have the same problem.

Chris Demetriou - -
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.