From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 6 12:22:42 2005 Return-Path: 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 6F47916A4CE for ; Sun, 6 Feb 2005 12:22:42 +0000 (GMT) Received: from web52702.mail.yahoo.com (web52702.mail.yahoo.com [206.190.39.153]) by mx1.FreeBSD.org (Postfix) with SMTP id E022843D46 for ; Sun, 6 Feb 2005 12:22:41 +0000 (GMT) (envelope-from kamalpr@yahoo.com) Received: (qmail 63592 invoked by uid 60001); 6 Feb 2005 12:22:41 -0000 Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; b=W2nI/dxYI4qJ86YEdwEVlEukRQMRHCT0UPADohjNP6DJDQPzXrwWk/YPvXQQUiIkX0MCakwdaJNkH1UNQ9YxeV4+5qvXvT6VYiS4UCuSQEeg7HztC7fLM/weNavefL+IXKUJtu39sb1fuwPrbAuxFyMyuWTXqDctBsUJTv6CUig= ; Message-ID: <20050206122241.63590.qmail@web52702.mail.yahoo.com> Received: from [202.91.78.244] by web52702.mail.yahoo.com via HTTP; Sun, 06 Feb 2005 04:22:41 PST Date: Sun, 6 Feb 2005 04:22:41 -0800 (PST) From: "Kamal R. Prasad" To: freebsd-hackers@freebsd.org In-Reply-To: <4206008F.2060100@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: Opening and wriiting to file in Kern X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: kamalp@acm.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Feb 2005 12:22:42 -0000 --- Scott Long wrote: > Ashwin Chandra wrote: > > > Does anyone know the correct calls to open a file, > write to it, and close it, IN *kernel* mode. > > > > Ash > > There is no common API for doing this, which is > pretty much on purpose. > First, you need to ask yourself why your task > needs it done in the > kernel and not in userland. > A feature implemented within the kernel that requires making stuff persistent would almost certainly require file I/O. For that matter, a kernel (module) that reads a configuration file will also need the same facility. I don't see anything wrong with providing a stream (like) interface to the filesystem. regards -kamal __________________________________ Do you Yahoo!? Yahoo! Mail - Find what you need with new enhanced search. http://info.mail.yahoo.com/mail_250