The Sysctl2 driver module


Sysctl2


Description:

This example shows how an user defined handler can be used to 'parse' a string to set an integer variable in the driver, in this case a simple 'on' or 'off' will be translated to 1 or 0 respectively.


Driver inodes:

The driver inode in /dev is usually created by

mknod /dev/Sysctl2 c major minor
If another major is needed it can be specified by the Sysctl2_major option to insmod:

insmod Sysctl2.o Sysctl2_major=new_major

Driver inodes:

All driver generated with LDDK have debugging information compiled into the code that can be configured with the dbgMask option to insmod. The bits of dbgMask specifies the debugging verbosity:

For example:

insmod Sysctl2.o dbgMask=0x06 logs all function entrys and exits to the kernel log daemon.

Wed Dec 23 17:53:49 1998