Date: Sat, 18 Mar 2000 00:44:28 -0500 (EST) From: "Matthew N. Dodd" <winter@jurai.net> To: "Gary T. Corcoran" <garycor@home.com> Cc: Alfred Perlstein <bright@wintelcom.net>, freebsd-hackers@FreeBSD.ORG Subject: Re: How to read a file from a device driver? Message-ID: <Pine.BSF.4.21.0003180040070.50194-100000@sasami.jurai.net> In-Reply-To: <38D314B6.CEFED2E0@home.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 18 Mar 2000, Gary T. Corcoran wrote: > Ugh. This isn't the answer I was looking for... :-( ;-) I can do > this in Windows (the original driver), I can do this in Linux (our new > port) via a slight kluge which temporarily fiddles with the segment > pointers (via standard system routines) to make it seem as if our > driver's buffer is in user space so that the standard system read() > can be called. Again, your best bet is to look at how the QUOTA stuff works; it reads and writes to the quota files. Heres the problem though; If you compile your kernel in, the root filesystem isn't mounted until after your drivers probe/attach routines have been called. It would be better if you made your firmware a KLD so that it can be loaded by the loader or demand loaded by the kernel linker when your driver is loaded. -- | Matthew N. Dodd | '78 Datsun 280Z | '75 Volvo 164E | FreeBSD/NetBSD | | winter@jurai.net | 2 x '84 Volvo 245DL | ix86,sparc,pmax | | http://www.jurai.net/~winter | This Space For Rent | ISO8802.5 4ever | 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?Pine.BSF.4.21.0003180040070.50194-100000>