现在测试一个简单的Linux下的驱动程序
如果不用copy_to_user,copy_from_user,则可以顺利通过
但用copy_to_user或者copy_from_user,就出错
我只是用copy做简单的测试,如下:
static int write_Test(struct inode * inode, struct file * file,
char * buffer, int count)
{
char tmp1[20];
copy_from_user(tmp1,buffer,count);
return 0;}
编译能通过,但是不能加载:
Warning: loading test.o will taint the kernel: forced load
test.o: init_module: Device or resource busy
Hint: insmod errors can be caused by incorrect module parameters, including invalid IO or IRQ parameters.
You may find more information in syslog or the output from dmesg
不知有什么错,望各位指点!
[align=right][color=#000066][此贴子已经被作者于2004-7-8 11:15:15编辑过][/color][/align]
有奖活动 | |
---|---|
“我踩过的那些坑”主题活动——第002期 | |
【EEPW电子工程师创研计划】技术变现通道已开启~ | |
发原创文章 【每月瓜分千元赏金 凭实力攒钱买好礼~】 | |
【EEPW在线】E起听工程师的声音! | |
高校联络员开始招募啦!有惊喜!! | |
【工程师专属福利】每天30秒,积分轻松拿!EEPW宠粉打卡计划启动! | |
送您一块开发板,2025年“我要开发板活动”又开始了! | |
打赏了!打赏了!打赏了! |