Hi,

On Jun 25, 2005, at 6:03 AM, Seb wrote:

Hello,
How can I access the filesystem from a kernel module ?
In fact, I want my device driver to retreive a firmware image stored on the
filesystem (instead of putting the firmware data in a static array at
compile-time) for memory usage and legal concerns. Blocking calls are OK.
I have searched the manpages and the web, but I haven't found anything
relevant.
Thanks,
Sebastien

You can use vn_open() to open the file, and then read it using vn_rdwr (), and finally, vn_close() to close it. Look at src/sys/kern/ link_elf_obj.c for an example.

--
Suleiman Souhlal     | [EMAIL PROTECTED]
The FreeBSD Project  | [EMAIL PROTECTED]

_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to