Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Mar 2001 08:20:50 -0600
From:      "Gurpratap Virdi" <gvirdi@gvirdi.com>
To:        "Daniel O'Connor" <doconnor@gsoft.com.au>, <hackers@FreeBSD.ORG>
Subject:   Re: Writing to a file in the kernel
Message-ID:  <002d01c0b924$a07d2090$8d7d1f26@dhgfhcpps5nhe1>
References:  <XFMail.010330234854.doconnor@gsoft.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
The problem is that printf's scroll off the screen. How can I write to a
file?

----- Original Message -----
From: "Daniel O'Connor" <doconnor@gsoft.com.au>
To: "Gurpratap Virdi" <gvirdi@gvirdi.com>
Cc: <hackers@FreeBSD.ORG>
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?002d01c0b924$a07d2090$8d7d1f26>