mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
character device failure TODO, mknoddev use awk
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
dev="$1"
|
||||
major="$(grep "$dev" /proc/devices | cut -d ' ' -f 1)"
|
||||
major="$(awk -F ' ' '$2 == "'"$dev"'" { print $1 }' /proc/devices)"
|
||||
mknod "/dev/$dev" c "$major" 0
|
||||
|
||||
Reference in New Issue
Block a user