tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Fixing Netbsd Issue:: Convert kernel printf() to aprint_*() or log()



Hi,

I am a newbie kernel hacker :) and trying to fix this issue first to get involved with complex tasks later.
My current NetBsd Setup:
VirtualBox, HDD7GB, RAM 1GB Netbsd7.0

I have updated the /usr/src with latest NetBsd-release branch 7.0 using cvs. I have successfully rebuilt and install the kernel.
Now I am modifying the printfs -> aprint_*() in kernel sources (There are thousands of them believe me :) ). Link of this project is at http://wiki.netbsd.org/projects/project/aprint/ .
I am using CVS to checkout at latest netbsd7.0 branch. is that ok or should I move to current branch ?.
Secondly, I had been looking at man aprint_*()  and there are multiple types as:

     aprint_normal()     Sends to the console unless AB_QUIET is set.  Always
                         sends to the log.

     aprint_naive()      Sends to the console only if AB_QUIET is set.  Never
                         sends to the log.

     aprint_verbose()    Sends to the console only if AB_VERBOSE is set.
                         Always sends to the log.

     aprint_debug()      Sends to the console and the log only if AB_DEBUG is
                         set.

     aprint_error()      Like aprint_normal(), but also keeps track of the
                         number of times called.  This allows a subsystem to
                         report the number of errors that occurred during a
                         quiet or silent initialization phase.
 
I need an advice from senior developer how to proceed on it. How to fit each of the abve aprints in kernel sources and send a patch to be merged.

Thanks.
Usama


Home | Main Index | Thread Index | Old Index