Thomas De Schampheleire wrote:
You're right that this probably is the cleanest solution.

However, this does not work for anything other than a debug parameter
right? Suppose I want to communicate with the module, for something
else. How can I do this?

An ioctl on the drivers device node, eg:

        fd = open("/dev/mydriver", O_RDWR);
        ioctl(fd, MYDRIVER_FOO_ACTION, &myfooadata);


In Linux, drivers and modules can use the /proc filesystem to pass
information from and to user space. A user can pass a parameter to the
module by writing to such a virtual file in /proc.

Which IMO is an abomination and a gross miss use of /proc.

For the reading part of /proc many things in the OpenSolaris kernel use kstat instead.

--
Darren J Moffat
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to