Re: how to prevent a function to be exported?

Richard B. Johnson (root@chaos.analogic.com)
Tue, 21 Sep 1999 21:39:37 -0400 (EDT)


On 21 Sep 1999, Arianna Caliari wrote:

> Hi,
> please bear with me if the question is too silly:
> how does a module prevent certain function to be exported?
> Please point me to an example (easy:)
>
> thanks,
> Arianna
>
Declare your function(s) static and don't export any symbols.
The functions known to the kernel are put into the `struct
file_operations` that you declare. Its address is passed to the
kernel during initialization when you register the device. Nothing
in your module needs to have a global scope except init_module() and
cleanup_module().

If you need a working template for a module that does just about
all the stuff a module would ever need to do, download...

ftp boneserver.analogic.com /pub/downloads/linux/module.tar.gz

It was written by Konstantyn Prokopenko of analogic fame, with a few
additions by yours truly.

Cheers,
Dick Johnson
**** FILE SYSTEM WAS MODIFIED ****
Penguin : Linux version 2.3.13 on an i686 machine (400.59 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.

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