From owner-freebsd-hackers Fri Mar 30 6:22:57 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from snipe.prod.itd.earthlink.net (snipe.prod.itd.earthlink.net [207.217.120.62]) by hub.freebsd.org (Postfix) with ESMTP id CB30A37B71B for ; Fri, 30 Mar 2001 06:22:50 -0800 (PST) (envelope-from gvirdi@gvirdi.com) Received: from dhgfhcpps5nhe1 (ip65.schiller-park9.il.pub-ip.psi.net [38.31.126.65]) by snipe.prod.itd.earthlink.net (EL-8_9_3_3/8.9.3) with SMTP id GAA21834; Fri, 30 Mar 2001 06:22:37 -0800 (PST) Message-ID: <002d01c0b924$a07d2090$8d7d1f26@dhgfhcpps5nhe1> From: "Gurpratap Virdi" To: "Daniel O'Connor" , References: Subject: Re: Writing to a file in the kernel Date: Fri, 30 Mar 2001 08:20:50 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.3018.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.3018.1300 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG The problem is that printf's scroll off the screen. How can I write to a file? ----- Original Message ----- From: "Daniel O'Connor" To: "Gurpratap Virdi" Cc: Sent: Friday, March 30, 2001 8:18 AM Subject: RE: Writing to a file in the kernel On 30-Mar-01 Gurpratap Virdi wrote: > I am trying to debug some modifications I made to the kernel. I would like > to write some debug messages to a log file however fopen(), fprint() don't > work. It gives me a linking error when I try to use them. How can I do this? > Thanks in advance! You could just use printf and the messages will appear in the console.. You can also add a debugging ioctl to your device, or a sysctl to change the debug level mid stream. --- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message