scullp_load

来自「这些是对(用 )于 书的来源文件" Linux Device Drivers"」· 代码 · 共 24 行

TXT
24
字号
#!/bin/shmodule="scullp"device="scullp"group="wheel"mode="664"# remove stale nodesrm -f /dev/${device}? # invoke insmod with all arguments we got/sbin/insmod -f $module $* || exit 1major=`cat /proc/devices | awk "\\$2==\"$module\" {print \\$1}"`mknod /dev/${device}0 c $major 0mknod /dev/${device}1 c $major 1mknod /dev/${device}2 c $major 2mknod /dev/${device}3 c $major 3ln -sf ${device}0  /dev/${device}# give appropriate group/permissionschgrp $group /dev/${device}[0-3]chmod $mode  /dev/${device}[0-3]

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?