From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 6 13:39:58 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 817CC16A4CE for ; Sun, 6 Feb 2005 13:39:58 +0000 (GMT) Received: from web52703.mail.yahoo.com (web52703.mail.yahoo.com [206.190.39.154]) by mx1.FreeBSD.org (Postfix) with SMTP id 1096A43D3F for ; Sun, 6 Feb 2005 13:39:58 +0000 (GMT) (envelope-from kamalpr@yahoo.com) Received: (qmail 79625 invoked by uid 60001); 6 Feb 2005 13:39:57 -0000 Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; b=QCJMKKa4QAvW8B7F6LtiBXE8nfUEaR58bzzPKdk9QwJVYtrRO3wIPeHIoepzQ+C3ANC25/DugDDafcVJWEa4h9nrVMRXaHEQnla8ZpG6rkPlreoOsxrzAN7PQUXBLcBUdpDYqPnfW0t+AeT0YzakI/s4YwfZq7AiN8XndQFf6Gk= ; Message-ID: <20050206133957.79623.qmail@web52703.mail.yahoo.com> Received: from [202.91.78.244] by web52703.mail.yahoo.com via HTTP; Sun, 06 Feb 2005 05:39:57 PST Date: Sun, 6 Feb 2005 05:39:57 -0800 (PST) From: "Kamal R. Prasad" To: freebsd-hackers@freebsd.org In-Reply-To: <20050206124109.GA29361@straylight.m.ringlet.net> 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 13:39:58 -0000 --- Peter Pentchev wrote: > On Sun, Feb 06, 2005 at 04:22:41AM -0800, Kamal R. > Prasad wrote: > > > > --- Scott Long wrote: > > > > > Ashwin Chandra wrote: [snip] > > facility. I don't see anything wrong with > providing a > > stream (like) interface to the filesystem. > > While there might indeed be nothing wrong with it, > besides added > complexity, the traditional way to do it would be to > have a userland > configuration utility that communicates with the > kernel module either > via ioctl's on some standard device, or via ioctl's > or reading/writing > of a driver-specific device. This has the advantage > of being a bit more > portable - while different OS's implement disk/file > I/O within the > kernel in wildly different ways, all OS's provide > relatively simple ways > for a kernel module to define a new device and > handle ioctl's to it, and > all OS's provide basically the same > userland-to-kernel interface for > having a program open a device and issue ioctl's to > it :) > No doubt about the portability aspect. But there are situations wherein the kernel does *NOT* want userland to know that it is using the filesystem for providing some functionaality. For a device, it is indeed typical for a userland program to accompany the driver. But besides that, there are definately situations (1 of which I am dealing with) wherein there is no userland code to help one out. [snip] regards -kamal __________________________________ Do you Yahoo!? Yahoo! Mail - 250MB free storage. Do more. Manage less. http://info.mail.yahoo.com/mail_250