I would like to pass an array of data to the Linux kernel module.
In the kernel:
int a[5];
int count;
module_param_array(a, int, &count, 0);
But I've no idea how to pass values from the command line. If it is a just variable I will use:
insmod k1.ko a=10
You can pass arrays via
insmod k1.ko a=10,20,30,40
see Linux Kernel Module Programming for more information and examples.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With