mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-29 04:54:27 +01:00
kernel modules: add a quick scull port from LDD3
Also:
* fix fops.c on both kernels:
* 5.9: the out of space error code was 1 not 8
* 6.6: for whatever reason we can't read the user buffer as before on the
diagnostic print, it leads to segfault and oops
* create memfile.c which is like fops.c but of unlimited size
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
insmod character_device.ko
|
||||
/mknoddev.sh lkmc_character_device
|
||||
./mknoddev.sh lkmc_character_device
|
||||
[ "$(cat /dev/lkmc_character_device)" = 'abcd' ]
|
||||
rm /dev/lkmc_character_device
|
||||
rmmod character_device
|
||||
|
||||
Reference in New Issue
Block a user