From owner-freebsd-doc Tue Dec 17 12:34: 8 2002 Delivered-To: freebsd-doc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4D01637B401 for ; Tue, 17 Dec 2002 12:34:06 -0800 (PST) Received: from mail.speakeasy.net (mail15.speakeasy.net [216.254.0.215]) by mx1.FreeBSD.org (Postfix) with ESMTP id CB5DF43EB2 for ; Tue, 17 Dec 2002 12:34:05 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: (qmail 24373 invoked from network); 17 Dec 2002 20:34:11 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail15.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 17 Dec 2002 20:34:11 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.6/8.12.6) with ESMTP id gBHKY2UT013083; Tue, 17 Dec 2002 15:34:03 -0500 (EST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <2802274.1040155203303.JavaMail.leimy2k@mac.com> Date: Tue, 17 Dec 2002 15:34:02 -0500 (EST) From: John Baldwin To: David Leimbach Subject: RE: Error in example for Kernel module.... Cc: freebsd-doc@FreeBSD.org, hiten@uk.FreeBSD.org Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On 17-Dec-2002 David Leimbach wrote: > > On Tuesday, Dec 17, 2002, at 01:02PM, Hiten Pandya wrote: > >>--- John Baldwin 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 <>< 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