Files
linux-kernel-module-cheat/rootfs_overlay/lkmc/seq_file_single_open.sh
Ciro Santilli 六四事件 法轮功 146e568db8 move all our stuff into /lkmc in guest
Motivation: userland is getting several new subdirectories, it would be
too insane to just dump all of that in the guest root filesystem.

To alleviate the cd pain, .profile puts user inside /lkmc by default.
2019-05-05 00:00:00 +00:00

8 lines
227 B
Bash
Executable File

#!/bin/sh
set -e
f=/sys/kernel/debug/lkmc_seq_file_single_open
insmod seq_file_single_open.ko
[ "$(cat "$f")" = "$(printf 'ab\ncd\n')" ]
[ "$(dd if="$f" bs=1 count=3 skip=1)" = "$(printf "b\nc\n")" ]
rmmod seq_file_single_open