mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 10:15:57 +01:00
Character device
This commit is contained in:
7
rootfs_overlay/character_device.sh
Executable file
7
rootfs_overlay/character_device.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
insmod /character_device.ko
|
||||
major="$(grep lkmc_character_device /proc/devices | cut -d ' ' -f 1)"
|
||||
mknod /character_device.dev c $major 0
|
||||
cat /character_device.dev
|
||||
# => abcd
|
||||
rmmod character_device
|
||||
Reference in New Issue
Block a user