Subject: Re: Convert kernel printf() to aprint_*() or log()
To: None <M.Drochner@fz-juelich.de>
From: Andrew Doran <firstname.lastname@example.org>
Date: 03/15/2007 16:52:56
> mjf@NetBSD.org said:
>> "Convert kernel printf() to aprint_*() or log()"
> Imho the aprint_ API is suboptimal because it causes
> some duplication if something is to be printed at
> multiple levels, and because it makes it hard to
> track line ends.
> A more suitable API should have
> -a bitmask argument to specify one or more levels at
> which to print the text
> -a flag which says "start this at a new line"
> So it wouldn't be stateless.
> Optionally, it could also keep track of a prefix
> (device name in drivers) and make sure that lines
> start with that + ":".
I like the bitmask idea, and perhaps a way to pass in a device_t.
One thing that I've wanted for a while are device properties that say
what a device is, and whether or not is is considered interesting enough
to note, so that autoconf can do the talking. So for instance while a
mainbus or host-pci bridge is probably not interesting for the casual
observer, a SCSI controller or USB keyboard would be.