Using open system call in KLD

Pawel Jakub Dawidek pjd at FreeBSD.org
Mon Mar 6 03:47:44 PST 2006


On Mon, Mar 06, 2006 at 02:10:10AM -0800, Anupam Deshpande wrote:
+> I successfully created a file using kern_open().
+> Now I want to 'write to' or 'read from' the file.What functions should
+> I use for that purpose?

This is not so trivial as it is in userland (but you already know
that:)).

Here are functions I created for one of my projects:

	http://people.freebsd.org/~pjd/misc/kernio/subr_kernio.c
	http://people.freebsd.org/~pjd/misc/kernio/kernio.h

There are only open/close/write functions - no read function as I didn't
needed it, so you must create one for your own.

-- 
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/20060306/5d3d638a/attachment.bin


More information about the freebsd-hackers mailing list