Re: module programming blues

From: Richard B. Johnson (root@chaos.analogic.com)
Date: Mon Feb 03 2003 - 17:23:57 EST


On Mon, 3 Feb 2003, Daniel Heater wrote:

> * Dhruv Gami (dhruvgami@yahoo.com) wrote:
> > Hello Everyone,
> >
> > I am trying to develop a kernel module that will read
> > some user input (being given to a file) and perform
> > certain flag settings based on the information dumped
> > in the file.
>

Easy. You have a user-program open the device and send it
parameters via ioctl(). That's the way it's supposed to be
done in a Unix environment. Devices get their parameters via
ioctls.

I have modules that get the entire contents of ASICs from
the contents of user-mode files. Something, at some time,
needs to `insmod` the module anyway. The exact same procedure
that does that can run a program that configures the module
dynamicaly, based, not only on the contents of files, but also
anything else. Do not make hacks to read files from the kernel.

Cheers,
Dick Johnson
Penguin : Linux version 2.4.18 on an i686 machine (797.90 BogoMips).
Why is the government concerned about the lunatic fringe? Think about it.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Feb 07 2003 - 22:00:13 EST