linux-mips
[Top] [All Lists]

Re: file handling in kernel mode

To: Brad Parker <brad@parker.boston.ma.us>
Subject: Re: file handling in kernel mode
From: Ralf Baechle <ralf@linux-mips.org>
Date: Mon, 17 Nov 2003 02:06:32 +0100
Cc: durai <durai@isofttech.com>, linux-mips@linux-mips.org
In-reply-to: <200311170046.hAH0kZX16327@p2.parker.boston.ma.us>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20031116225133.GA7808@linux-mips.org> <200311170046.hAH0kZX16327@p2.parker.boston.ma.us>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.4.1i
On Sun, Nov 16, 2003 at 07:46:35PM -0500, Brad Parker wrote:

> Shouldn't someone point out that having a driver read a file is 
> very, very wrong and a classic FAQ question?

It is.

> Perhaps I'm mistaken but this seems to come up once a year on every port
> list I'm on.

I think it's the first time on this list.  In my previous posting I suggested
request_firmware for 2.4.23 / 2.6.  For kernels older than this I suggest
arch/i386/kernel/microcode.c as an example for how to easily implement
a character special file.

> Resist the temptation to put code in the driver to access the file
> system.

Amen.

> ps: isn't hotplug already setup to notice when a device comes up and to
> have a shell script run?  it's bad enough that the hotplug code runs a
> shell script from the kernel.  I can't believe that got through...
> 
> (and if you have time, go read the plan 9 design docs.  then ask yourself
> what those guys would do :-)

2.6 certainly is quite a bit more plan 9-ish.  What would you expect from
Al Viro :-)

  Ralf

<Prev in Thread] Current Thread [Next in Thread>