[openbeos] Re: Intel 945GM Support (intel_extreme driver)

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: openbeos@xxxxxxxxxxxxx
  • Date: Thu, 03 Aug 2006 11:52:19 +0200 CEST

"Mathew Schofield" <mr.skoe@xxxxxxxxx> wrote:
> > The easiest way would be via serial debugging cable and a few
> > dprintf()s in the driver.
> Unfortunetly not only do i not have a serial cable, but theres no 
> serial
> port on the laptop... :(.

Gotcha! :-)

> > If you don't have that, you could write output to a file, and do a 
> > open
> > /write/close/sync for every line you put in there.
> Do you mean using the standard C FileI/O functions? I just tried this
> anyway (Messing around) and i'm getting 'undefined reference...'. Is
> this because a driver is a kernel-module where these functions don't
> belong?

That's why I wrote open/write/close/sync - you have to use those 
functions, there are no high-level fopen(), fputs(), etc. functions in 
the kernel.
You can use O_APPEND with open(), though, so that you don't overwrite 
previous output :-)
Like:
fd = open("/boot/home/ie.debug", O_WRONLY | O_APPEND);
if (fd >= 0) {
        write(fd, message, strlen(message));
        close(fd);
        sync();
}

> I think my noobness is showing again :O. Sorry.

No problem :-)

Bye,
   Axel.


Other related posts: