Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Mar 2006 12:47:08 +0100
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        Anupam Deshpande <anupamdeshpande@gmail.com>
Cc:        freebsd-hackers@freebsd.org, Robert Watson <rwatson@freebsd.org>
Subject:   Re: Using open system call in KLD
Message-ID:  <20060306114708.GD53437@garage.freebsd.pl>
In-Reply-To: <25da4ac50603060210j1902a751g9e4c615605f9def7@mail.gmail.com>
References:  <25da4ac50603050701j3fc63843oe288f6d34b67d115@mail.gmail.com> <20060305172046.V51568@fledge.watson.org> <25da4ac50603060210j1902a751g9e4c615605f9def7@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--mJm6k4Vb/yFcL9ZU
Content-Type: text/plain; charset=iso-8859-2
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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.

--=20
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd@FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!

--mJm6k4Vb/yFcL9ZU
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (FreeBSD)

iD8DBQFEDCE8ForvXbEpPzQRAqlXAJ9GVnOQPrq3lw6WtGCFxYDMtWvxrgCg2x7b
ZFU+ggmZdICf2Z3ifTxMEJU=
=0JW1
-----END PGP SIGNATURE-----

--mJm6k4Vb/yFcL9ZU--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060306114708.GD53437>