From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 5 21:43:58 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 753B716A420 for ; Sun, 5 Feb 2006 21:43:58 +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 C459543D46 for ; Sun, 5 Feb 2006 21:43:57 +0000 (GMT) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 001F750F90; Sun, 5 Feb 2006 22:43:54 +0100 (CET) Received: from localhost (dkf117.neoplus.adsl.tpnet.pl [83.24.9.117]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id B523F50D3B; Sun, 5 Feb 2006 22:43:48 +0100 (CET) Date: Sun, 5 Feb 2006 22:43:35 +0100 From: Pawel Jakub Dawidek To: Pranav Sawargaonkar Message-ID: <20060205214335.GA779@garage.freebsd.pl> References: <5007e1a40602051012n16016431wf743684dded0a5d7@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mP3DRpeJDSE+ciuQ" Content-Disposition: inline In-Reply-To: <5007e1a40602051012n16016431wf743684dded0a5d7@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=-0.5 required=3.0 tests=BAYES_00,RCVD_IN_NJABL_DUL, RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: freebsd-hackers@freebsd.org Subject: Re: File creation using 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: Sun, 05 Feb 2006 21:43:58 -0000 --mP3DRpeJDSE+ciuQ Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --mP3DRpeJDSE+ciuQ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFD5nGHForvXbEpPzQRAiv/AJwOWWYYKzgCWEh4YP3j16R/Ad0R7QCg9XG1 sWOPax8ZWJIJulooZX7OnG0= =t0g0 -----END PGP SIGNATURE----- --mP3DRpeJDSE+ciuQ--