seq_file, printk to pr_info, disk persistency

This commit is contained in:
Ciro Santilli
2017-07-13 13:06:25 +01:00
parent 32855c325e
commit 8058ee9f2b
9 changed files with 201 additions and 20 deletions

19
rootfs_overlay/seq_file.sh Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/sh
set -ex
insmod /seq_file.ko
cd /sys/kernel/debug
cat 'lkmc_seq_file'
# => 0
# => 1
# => 2
cat 'lkmc_seq_file'
# => 3
# => 4
# => 5
# TODO understand, why does this print nothing?
dd if='lkmc_seq_file' bs=1 count=2 skip=2

View File

@@ -0,0 +1,8 @@
#!/bin/sh
set -ex
insmod /seq_file_single.ko
cd /sys/kernel/debug
cat 'lkmc_seq_file_single'
# => abcd
dd if='lkmc_seq_file_single' bs=1 skip=2
# => cd