|
|
|
@ -17,10 +17,47 @@
|
|
|
|
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
int main()
|
|
|
|
|
{
|
|
|
|
|
printf("Hello world\n");
|
|
|
|
|
return (0);
|
|
|
|
|
/**** Includes ***************************************************************
|
|
|
|
|
*******************************************************************************/
|
|
|
|
|
#include <linux/init.h>
|
|
|
|
|
#include <linux/module.h>
|
|
|
|
|
#include <linux/kernel.h>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**** Modinfo ****************************************************************
|
|
|
|
|
*******************************************************************************/
|
|
|
|
|
|
|
|
|
|
MODULE_LICENSE("GPLv3");
|
|
|
|
|
MODULE_AUTHOR("JanKoernerEnterprises");
|
|
|
|
|
MODULE_DESCRIPTION("8008135");
|
|
|
|
|
MODULE_VERSION("0.1");
|
|
|
|
|
|
|
|
|
|
/**** var ********************************************************************
|
|
|
|
|
*******************************************************************************/
|
|
|
|
|
static char *name = "8008135";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*** FUNCTION ****************************************************************
|
|
|
|
|
* NAME: init_8008135
|
|
|
|
|
* DESCRIPTION: initializing Kernel Module
|
|
|
|
|
* PARAMETERS: -
|
|
|
|
|
* RETURNS: int
|
|
|
|
|
*******************************************************************************/
|
|
|
|
|
static int __init init_8008135(void) {
|
|
|
|
|
printk(KERN_INFO "Loading %s into Kernel", name);
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*** FUNCTION ****************************************************************
|
|
|
|
|
* NAME: exit_8008135
|
|
|
|
|
* DESCRIPTION: unloading Kernel Module
|
|
|
|
|
* PARAMETERS: -
|
|
|
|
|
* RETURNS: -
|
|
|
|
|
*******************************************************************************/
|
|
|
|
|
static void __exit exit_8008135(void) {
|
|
|
|
|
printk(KERN_INFO "Unloading %s from Kernel", name);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Setting pointers to init-/exit-functions
|
|
|
|
|
module_init(init_8008135);
|
|
|
|
|
module_exit(exit_8008135);
|
|
|
|
|