Character device

This commit is contained in:
Ciro Santilli
2017-06-15 10:28:33 +01:00
parent be105c7106
commit 5a4e0ed50b
3 changed files with 75 additions and 0 deletions

View 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