1
0
Files
MSE-CSEL/src/01-skeleton/s02-kernel-module/s02e02-parameters.c

15 lines
412 B
C

#include <linux/module.h> // needed by all modules
#include <linux/init.h> // needed for macros
#include <linux/kernel.h> // needed for debugging
#include <linux/moduleparam.h>
static char* text = "dummy text";
module_param(text, charp, 0664);
static int elements = 1;
module_param(elements, int, 0);
void parameters_print(void) {
pr_debug("text: %s\n", text);
pr_debug("elements: %d\n", elements);
}