mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-27 12:04:27 +01:00
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.
This commit is contained in:
13
rootfs_overlay/lkmc/debugfs.sh
Executable file
13
rootfs_overlay/lkmc/debugfs.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
d=/debugfs
|
||||
mkdir -p "$d"
|
||||
mount -t debugfs none "$d"
|
||||
insmod debugfs.ko
|
||||
[ "$(cat "${d}/lkmc_debugfs/myfile")" = 42 ]
|
||||
echo 13 > "${d}/lkmc_debugfs/myfile"
|
||||
[ "$(cat "${d}/lkmc_debugfs/myfile")" = 13 ]
|
||||
echo 666 > "${d}/lkmc_debugfs_file"
|
||||
[ "$(cat "${d}/lkmc_debugfs/myfile")" = 666 ]
|
||||
rmmod debugfs
|
||||
umount "$d"
|
||||
Reference in New Issue
Block a user