File creation using KLD

Pawel Jakub Dawidek pjd at FreeBSD.org
Sun Feb 5 13:43:58 PST 2006


On Sun, Feb 05, 2006 at 11:42:04PM +0530, Pranav Sawargaonkar wrote:
+> Hi
+> I want  to create a file on disk using  KLD and then tryout some reading and
+> writing stuff on  that file,so can any one suggest me any solution i.e.
+> functions to use and locks which i need to carry out this.

This is a bit tricky, ie. there is no clean API for this, but it is of
course possible.

There are few frameworks in the kernel that do exactly this. One of them
is alq(9), so take a look at sys/kern/kern_alq.c.

-- 
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd at FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20060205/1b92c86a/attachment.bin


More information about the freebsd-hackers mailing list