Re: Accessing filesystem from a KLD
From: Suleiman Souhlal (ssouhlal_at_FreeBSD.org)
Date: 06/25/05
- Previous message: Seb: "Accessing filesystem from a KLD"
- In reply to: Seb: "Accessing filesystem from a KLD"
- Next in thread: M. Warner Losh: "Re: Accessing filesystem from a KLD"
- Reply: M. Warner Losh: "Re: Accessing filesystem from a KLD"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 25 Jun 2005 06:15:18 -0400 To: Seb <sebastien.b@swissinfo.org>
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 | ssouhlal@vt.edu The FreeBSD Project | ssouhlal@FreeBSD.org _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
- Previous message: Seb: "Accessing filesystem from a KLD"
- In reply to: Seb: "Accessing filesystem from a KLD"
- Next in thread: M. Warner Losh: "Re: Accessing filesystem from a KLD"
- Reply: M. Warner Losh: "Re: Accessing filesystem from a KLD"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|