From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 6 11:47:44 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CF83516A420; Mon, 6 Mar 2006 11:47:44 +0000 (GMT) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id 12BAA43D48; Mon, 6 Mar 2006 11:47:44 +0000 (GMT) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id ADD775174A; Mon, 6 Mar 2006 12:47:41 +0100 (CET) Received: from localhost (ana50.internetdsl.tpnet.pl [83.17.82.50]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 6B23F516E1; Mon, 6 Mar 2006 12:47:33 +0100 (CET) Date: Mon, 6 Mar 2006 12:47:08 +0100 From: Pawel Jakub Dawidek To: Anupam Deshpande Message-ID: <20060306114708.GD53437@garage.freebsd.pl> References: <25da4ac50603050701j3fc63843oe288f6d34b67d115@mail.gmail.com> <20060305172046.V51568@fledge.watson.org> <25da4ac50603060210j1902a751g9e4c615605f9def7@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mJm6k4Vb/yFcL9ZU" Content-Disposition: inline In-Reply-To: <25da4ac50603060210j1902a751g9e4c615605f9def7@mail.gmail.com> X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng/devel-r535 (FreeBSD) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-5.9 required=3.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 Cc: freebsd-hackers@freebsd.org, Robert Watson Subject: Re: Using open system call in KLD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Mar 2006 11:47:44 -0000 --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--