mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
8 lines
206 B
Bash
Executable File
8 lines
206 B
Bash
Executable File
#!/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
|