Date: Tue, 17 Dec 2002 15:34:02 -0500 (EST) From: John Baldwin <jhb@FreeBSD.org> To: David Leimbach <leimy2k@mac.com> Cc: freebsd-doc@FreeBSD.org, hiten@uk.FreeBSD.org Subject: RE: Error in example for Kernel module.... Message-ID: <XFMail.20021217153402.jhb@FreeBSD.org> In-Reply-To: <2802274.1040155203303.JavaMail.leimy2k@mac.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 17-Dec-2002 David Leimbach wrote: > > On Tuesday, Dec 17, 2002, at 01:02PM, Hiten Pandya <hitmaster2k@yahoo.com> wrote: > >>--- John Baldwin <jhb@FreeBSD.org> wrote: >>> > This is probably minor... >>> >>> You can use printf in the kernel directly. >> >>I think he was trying to say, that there are only two occurences of >>printf(), i.e. 'Echo device loaded/unloaded', so might as well convert >>them to uprintf() for consistency -- or the other way round. I like >>that former, but I dont have authority. :) > > Sorry for my terseness. I am sure that caused confusion. The consistency is part of the > comment. The other part has to do with the fact that uprintf displays information on the > console. Since these are debugging messages for newbie kernel hackers like myself > it seemed appropriate to give the user immediate feedback. > > Either that or use printf and redirect the user to the system logs which is where I think that > output ends up. printf() does output directly on the kernel console, so it will be seen directly. > I made an earlier comment about these not being quite FBSD 5.0 compliant with the function > protoypes for read/write since we now have thread *'s instead of proc *'s. Yes. To be perfectly compatible across 4.x and 5.x it should probably use d_thread_t for the last arg. -- John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20021217153402.jhb>