tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Fixing Netbsd Issue:: Convert kernel printf() to aprint_*() or log()
On Sat, Feb 20, 2016 at 01:13:50PM +0500, Usama Mehboob wrote:
> 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.
These changes will not be suitable for the netbsd-7 branch. Please work
on -current.
The aprint_*(9) functions are *only* suitable for use within
autoconf(9) code. The printf(9) or log(9) functions need to be used if
it is not autoconf(9)-related. There is existing code that abuses
aprint_*(), please fix that too.
Jonathan Kollasch
Home |
Main Index |
Thread Index |
Old Index