📄 linux设备驱动程序学习(6)-高级字符驱动程序操作[(3)设备文件的访问控制] - linux设备驱动程序 - tekkaman ninja.htm
字号:
style="COLOR: #0000cc">/</SPAN>tmp<SPAN
style="COLOR: #0000cc">/</SPAN>singleUID_testr<SPAN
style="COLOR: #0000cc">&</SPAN><BR><SPAN
style="COLOR: #0000cc">[</SPAN>Tekkaman2440@SBC2440V4<SPAN
style="COLOR: #0000cc">]</SPAN><SPAN
style="COLOR: #0000cc">#</SPAN>login
tekkaman<BR>Password<SPAN
style="COLOR: #0000cc">:</SPAN><BR><SPAN
style="COLOR: #ff0000">Set</SPAN> <SPAN
style="COLOR: #ff0000">search</SPAN> library
path <SPAN style="COLOR: #0000ff">int</SPAN>
<SPAN style="COLOR: #0000cc">/</SPAN>etc<SPAN
style="COLOR: #0000cc">/</SPAN>profile<BR><SPAN
style="COLOR: #ff0000">Set</SPAN> user path in
<SPAN style="COLOR: #0000cc">/</SPAN>etc<SPAN
style="COLOR: #0000cc">/</SPAN>profile<BR>runing
<SPAN style="COLOR: #0000cc">/</SPAN>etc<SPAN
style="COLOR: #0000cc">/</SPAN>profile
ok<BR><SPAN
style="COLOR: #0000cc">[</SPAN>Tekkaman2440@SBC2440V4<SPAN
style="COLOR: #0000cc">]</SPAN><SPAN
style="COLOR: #0000cc">#</SPAN><SPAN
style="COLOR: #0000cc">/</SPAN>tmp<SPAN
style="COLOR: #0000cc">/</SPAN>singleUID_testw<BR><SPAN
style="COLOR: #ff0000">open</SPAN> singleUID
code<SPAN style="COLOR: #0000cc">=</SPAN><SPAN
style="COLOR: #0000cc">-</SPAN>1<BR><SPAN
style="COLOR: #0000cc">[</SPAN>Tekkaman2440@SBC2440V4<SPAN
style="COLOR: #0000cc">]</SPAN><SPAN
style="COLOR: #0000cc">#</SPAN><SPAN
style="COLOR: #0000cc">/</SPAN>tmp<SPAN
style="COLOR: #0000cc">/</SPAN>singleUID_testr<BR><SPAN
style="COLOR: #ff0000">open</SPAN> singleUID
code<SPAN style="COLOR: #0000cc">=</SPAN><SPAN
style="COLOR: #0000cc">-</SPAN>1<BR><SPAN
style="COLOR: #0000cc">[</SPAN>Tekkaman2440@SBC2440V4<SPAN
style="COLOR: #0000cc">]</SPAN><SPAN
style="COLOR: #0000cc">#</SPAN><SPAN
style="COLOR: #ff0000">exit</SPAN><BR><SPAN
style="COLOR: #0000cc">[</SPAN>Tekkaman2440@SBC2440V4<SPAN
style="COLOR: #0000cc">]</SPAN><SPAN
style="COLOR: #0000cc">#</SPAN><SPAN
style="COLOR: #0000cc">/</SPAN>tmp<SPAN
style="COLOR: #0000cc">/</SPAN>singleUID_testw<BR><SPAN
style="COLOR: #ff0000">write</SPAN> code<SPAN
style="COLOR: #0000cc">=</SPAN>0<BR><SPAN
style="COLOR: #0000cc">[</SPAN>Tekkaman2440@SBC2440V4<SPAN
style="COLOR: #0000cc">]</SPAN><SPAN
style="COLOR: #0000cc">#</SPAN><SPAN
style="COLOR: #ff0000">read</SPAN> code<SPAN
style="COLOR: #0000cc">=</SPAN>0<BR><BR><SPAN
style="COLOR: #0000cc">[</SPAN>1<SPAN
style="COLOR: #0000cc">]</SPAN> <SPAN
style="COLOR: #0000cc">+</SPAN> Done <SPAN
style="COLOR: #0000cc">/</SPAN>tmp<SPAN
style="COLOR: #0000cc">/</SPAN>singleUID_testr</SPAN></CODE></P></TD></TR></TBODY></TABLE>
<P><STRONG><FONT color=#0000ff
size=4>阻塞型单用户访问</FONT></STRONG></P><STRONG><FONT
color=#0000ff size=4>
<P><FONT size=4><FONT face=新宋体 size=3><FONT
color=#000000>模块程序链接</FONT>:<A
href="http://blogimg.chinaunix.net/blog/upfile2/071107144836.gz"
target=_blank><FONT face="Courier New"
size=2>completion-singleUIDnb.tar.gz</FONT></A></FONT></FONT></P>
<P><FONT size=4><FONT size=3><FONT
color=#000000>模块测试程序<FONT
face=新宋体>链接</FONT></FONT>:<A
href="http://blogimg.chinaunix.net/blog/upfile2/071109103245.gz"
target=_blank><FONT
size=2>completion-singleUIDnb-test.tar.gz</FONT></A></FONT></FONT></P>
<P><SPAN style="COLOR: rgb(0,1,255)"><FONT
size=4>ARM9实验板的实验现象是:</FONT></SPAN></FONT></STRONG></P>
<TABLE style="BORDER-COLLAPSE: collapse"
borderColor=#999999 cellSpacing=0 cellPadding=0
width="95%" bgColor=#f1f1f1 border=1>
<TBODY>
<TR>
<TD>
<P
style="MARGIN: 5px; LINE-HEIGHT: 150%"><CODE><SPAN
style="COLOR: #000000"><SPAN
style="COLOR: #0000cc">[</SPAN>Tekkaman2440@SBC2440V4<SPAN
style="COLOR: #0000cc">]</SPAN><SPAN
style="COLOR: #0000cc">#</SPAN>insmod <SPAN
style="COLOR: #0000cc">/</SPAN>lib<SPAN
style="COLOR: #0000cc">/</SPAN>modules<SPAN
style="COLOR: #0000cc">/</SPAN>singleUIDnb<SPAN
style="COLOR: #0000cc">.</SPAN>ko<BR><SPAN
style="COLOR: #0000cc">[</SPAN>Tekkaman2440@SBC2440V4<SPAN
style="COLOR: #0000cc">]</SPAN><SPAN
style="COLOR: #0000cc">#</SPAN>cat <SPAN
style="COLOR: #0000cc">/</SPAN>proc<SPAN
style="COLOR: #0000cc">/</SPAN>devices<BR>Character
devices<SPAN
style="COLOR: #0000cc">:</SPAN><BR> 1
mem<BR> 2 pty<BR> 3
ttyp<BR> 4 <SPAN
style="COLOR: #0000cc">/</SPAN>dev<SPAN
style="COLOR: #0000cc">/</SPAN>vc<SPAN
style="COLOR: #0000cc">/</SPAN>0<BR> 4
tty<BR> 4 ttyS<BR> 5 <SPAN
style="COLOR: #0000cc">/</SPAN>dev<SPAN
style="COLOR: #0000cc">/</SPAN>tty<BR> 5
<SPAN style="COLOR: #0000cc">/</SPAN>dev<SPAN
style="COLOR: #0000cc">/</SPAN>console<BR> 5
<SPAN style="COLOR: #0000cc">/</SPAN>dev<SPAN
style="COLOR: #0000cc">/</SPAN>ptmx<BR> 7
vcs<BR> 10 misc<BR> 13
input<BR> 14 sound<BR> 81
video4linux<BR> 89 i2c<BR> 90
mtd<BR>116 alsa<BR>128 ptm<BR>136 pts<BR>180
usb<BR>189 usb_device<BR>204
s3c2410_serial<BR><FONT color=#ff0000>252
singleUIDnb</FONT><BR>253 usb_endpoint<BR>254
rtc<BR><BR>Block devices<SPAN
style="COLOR: #0000cc">:</SPAN><BR> 1
ramdisk<BR>256 rfd<BR> 7
loop<BR> 31 mtdblock<BR> 93
nftl<BR> 96 inftl<BR>179 mmc<BR><SPAN
style="COLOR: #0000cc">[</SPAN>Tekkaman2440@SBC2440V4<SPAN
style="COLOR: #0000cc">]</SPAN><SPAN
style="COLOR: #0000cc">#</SPAN>mknod <SPAN
style="COLOR: #0000cc">-</SPAN>m 666 <SPAN
style="COLOR: #0000cc">/</SPAN>dev<SPAN
style="COLOR: #0000cc">/</SPAN>singleUIDnb c 252
0<BR><SPAN
style="COLOR: #0000cc">[</SPAN>Tekkaman2440@SBC2440V4<SPAN
style="COLOR: #0000cc">]</SPAN><SPAN
style="COLOR: #0000cc">#</SPAN><SPAN
style="COLOR: #0000cc">/</SPAN>tmp<SPAN
style="COLOR: #0000cc">/</SPAN>singleUID_testrnb<SPAN
style="COLOR: #0000cc">&</SPAN><BR><SPAN
style="COLOR: #0000cc">[</SPAN>Tekkaman2440@SBC2440V4<SPAN
style="COLOR: #0000cc">]</SPAN><SPAN
style="COLOR: #0000cc">#</SPAN>login
tekkaman<BR>Password<SPAN
style="COLOR: #0000cc">:</SPAN><BR><SPAN
style="COLOR: #ff0000">Set</SPAN> <SPAN
style="COLOR: #ff0000">search</SPAN> library
path <SPAN style="COLOR: #0000ff">int</SPAN>
<SPAN style="COLOR: #0000cc">/</SPAN>etc<SPAN
style="COLOR: #0000cc">/</SPAN>profile<BR><SPAN
style="COLOR: #ff0000">Set</SPAN> user path in
<SPAN style="COLOR: #0000cc">/</SPAN>etc<SPAN
style="COLOR: #0000cc">/</SPAN>profile<BR>runing
<SPAN style="COLOR: #0000cc">/</SPAN>etc<SPAN
style="COLOR: #0000cc">/</SPAN>profile
ok<BR><SPAN
style="COLOR: #0000cc">[</SPAN>Tekkaman2440@SBC2440V4<SPAN
style="COLOR: #0000cc">]</SPAN><SPAN
style="COLOR: #0000cc">#</SPAN><SPAN
style="COLOR: #0000cc">/</SPAN>tmp<SPAN
style="COLOR: #0000cc">/</SPAN>singleUID_testrnb
<SPAN
style="COLOR: #0000cc">&</SPAN><BR><SPAN
style="COLOR: #0000cc">[</SPAN>Tekkaman2440@SBC2440V4<SPAN
style="COLOR: #0000cc">]</SPAN><SPAN
style="COLOR: #0000cc">#</SPAN><SPAN
style="COLOR: #0000cc">/</SPAN>tmp<SPAN
style="COLOR: #0000cc">/</SPAN>singleUID_testwnb
<SPAN
style="COLOR: #0000cc">&</SPAN><BR><SPAN
style="COLOR: #0000cc">[</SPAN>Tekkaman2440@SBC2440V4<SPAN
style="COLOR: #0000cc">]</SPAN><SPAN
style="COLOR: #0000cc">#</SPAN><SPAN
style="COLOR: #ff0000">exit</SPAN><BR><SPAN
style="COLOR: #0000cc">[</SPAN>Tekkaman2440@SBC2440V4<SPAN
style="COLOR: #0000cc">]</SPAN><SPAN
style="COLOR: #0000cc">#</SPAN>ps<BR> PID
Uid VSZ Stat
Command<BR> 1 root 1744 S
init<BR> 2 root SW<SPAN
style="COLOR: #0000cc"><</SPAN> <SPAN
style="COLOR: #0000cc">[</SPAN>kthreadd<SPAN
style="COLOR: #0000cc">]</SPAN><BR> 3
root SWN <SPAN
style="COLOR: #0000cc">[</SPAN>ksoftirqd<SPAN
style="COLOR: #0000cc">/</SPAN>0<SPAN
style="COLOR: #0000cc">]</SPAN><BR> 4
root SW<SPAN style="COLOR: #0000cc"><</SPAN>
<SPAN
style="COLOR: #0000cc">[</SPAN>watchdog<SPAN
style="COLOR: #0000cc">/</SPAN>0<SPAN
style="COLOR: #0000cc">]</SPAN><BR> 5
root SW<SPAN style="COLOR: #0000cc"><</SPAN>
<SPAN style="COLOR: #0000cc">[</SPAN>events<SPAN
style="COLOR: #0000cc">/</SPAN>0<SPAN
style="COLOR: #0000cc">]</SPAN><BR> 6
root SW<SPAN style="COLOR: #0000cc"><</SPAN>
<SPAN
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -