|
|
|
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
|
|
|
|
/*
|
|
|
|
* main.c
|
|
|
|
* Copyright (C) 2019
|
|
|
|
*
|
|
|
|
* 8008135 is free software: you can redistribute it and/or modify it
|
|
|
|
* under the terms of the GNU General Public License as published by the
|
|
|
|
* Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* 8008135 is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
* See the GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**** 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);
|