Subject: Re: Convert kernel printf() to aprint_*() or log()
To: None <M.Drochner@fz-juelich.de>
From: Jason Thorpe <thorpej@shagadelic.org>
List: tech-kern
Date: 03/15/2007 09:30:44
On Mar 15, 2007, at 5:50 AM, Matthias Drochner wrote:

>
> mjf@NetBSD.org said:
>> What duplication?
>
> Eg in kern/subr_autoconf:
>        if (parent == ROOT) {
>                aprint_naive("%s (root)", dev->dv_xname);
>                aprint_normal("%s (root)", dev->dv_xname);
>        } else {
>                aprint_naive("%s at %s", dev->dv_xname, parent- 
> >dv_xname);
>                aprint_normal("%s at %s", dev->dv_xname, parent- 
> >dv_xname);

Yah, I borrowed the API names from BSD/OS.  We can certainly have a  
better API, and perhaps keep the old API as compatibility wrappers.

Maybe:

	aprint_level(APRINT_NAIVE | APRINT_NORMAL, "%s (root)", dev->dv_xname);

As for the multi-line output problem, I'd actually like to solve that  
a different way, moving away from the model we use for printing  
autoconf messages in the first place.  But I don't have a concrete  
proposal for that right now, so maybe we can go for the incremental  
improvement first :-)

>
>
> best regards
> Matthias

-- thorpej