ldd3的short的读写都是255,问题在哪里?
无论往/dev/short0中写入什么,读出的都是255,不知道问题出在哪里了?
[root@MagicLinux short]# ./short_load
[root@MagicLinux short]# tail /var/log/messages
Feb 26 13:00:48 MagicLinux pppoe[2540]: PPP session is 2089 (0x829)
Feb 26 13:00:51 MagicLinux pppd[2537]: Remote message: 0;User(z1367055) Authenticate OK, Request
Accept by hb.cn
Feb 26 13:00:51 MagicLinux pppd[2537]: PAP authentication succeeded
Feb 26 13:00:51 MagicLinux pppd[2537]: local IP address 59.174.146.232
Feb 26 13:00:51 MagicLinux pppd[2537]: remote IP address 59.174.144.1
Feb 26 13:00:51 MagicLinux pppd[2537]: primary DNS address 202.110.190.6
Feb 26 13:00:51 MagicLinux pppd[2537]: secondary DNS address 202.103.44.150
Feb 26 13:04:23 MagicLinux su(pam_unix)[2653]: session opened for user root by (uid=500)
Feb 26 13:24:22 MagicLinux kernel: Trying to free nonexistent resource <dc808fc0-dc808fc7>
Feb 26 13:25:27 MagicLinux kernel: short: can't get assigned irq 7
[root@MagicLinux short]# ls /dev/short*
/dev/short0 /dev/short1 /dev/short2 /dev/short3 /dev/short4 /dev/short5 /dev/short6 /dev/short7 /dev/shortint
/dev/short0p /dev/short1p /dev/short2p /dev/short3p /dev/short4p /dev/short5p /dev/short6p /dev/short7p /dev/shortprint
/dev/short0s /dev/short1s /dev/short2s /dev/short3s /dev/short4s /dev/short5s /dev/short6s /dev/short7s
[root@MagicLinux short]#
[root@MagicLinux short]# echo -n "2" > /dev/short0
[root@MagicLinux short]# dd if=/dev/short0 bs=1 count=1 |od -t u1
1+0 records in
1+0 records out
1 byte (1 B) copied, 3.4e-05 seconds, 29.4 kB/s
0000000 255
0000001
[root@MagicLinux short]# echo -n "ertg" > /dev/short0
[root@MagicLinux short]# dd if=/dev/short0 bs=1 count=1 |od -t u1
1+0 records in
1+0 records out
1 byte (1 B) copied, 3.5e-05 seconds, 28.6 kB/s
0000000 255
0000001
[root@MagicLinux short]#
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论