Thanks, I am going to shift to current branch. I am double checking the autoconf code part. Am I supposed to audit only autoconf/device configuration related functions for printfs as described here http://netbsd.gw.com/cgi-bin/man-cgi?autoconf+9.i386+NetBSD-current ?; All other driver functions should be using log instead of printfs as describe in project. How am I going to differentiate these driver functions from rest of the functions in kernel source code. ?
Thanks Usama One more thing, As I would be working on current branch, so I would have to keep updating branch each day (small conflicts are easy to resolve) to keep it from hassle of merging all at once; it will cause huge conflicts. On Sat, Feb 20, 2016 at 7:34 PM, Jonathan A. Kollasch <[email protected] > wrote: > 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 >
