免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2574 | 回复: 0
打印 上一主题 下一主题

ldd3的short的读写都是255,问题在哪里? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-02-26 13:28 |只看该作者 |倒序浏览
无论往/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]#
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP