split kernel module api docs to README

This commit is contained in:
Ciro Santilli
2018-07-01 23:37:37 +01:00
parent 8f37cd0d22
commit 6c241279a6
18 changed files with 490 additions and 296 deletions

20
rootfs_overlay/params.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/sh
set -e
d=/sys/module/params/parameters
i="${d}/i"
j="${d}/j"
f=/sys/kernel/debug/lkmc_params
insmod /params.ko
[ "$(cat "$i")" = 0 ]
[ "$(cat "$j")" = 0 ]
[ "$(cat "$f")" = '0 0' ]
printf 1 > "$i"
[ "$(cat "$f")" = '1 0' ]
printf 2 > "$j"
[ "$(cat "$f")" = '1 2' ]
rmmod params
insmod /params.ko i=3 j=4
[ "$(cat "$f")" = '3 4' ]
rmmod params