1
写功能我写了一个Linux设备驱动程序,实现的功能device_write这样的:关于Linux设备驱动
static int device_write(struct file* file,const char* buff,int count, loff * offp)
{
//some implementation
printk("write value %x to card\n",value);
//some implementation
}
我也实现了device_read功能,并有中printk打印一些信息在里面。 问题是当我在应用程序中使用read(fd,buff,1)时,显示printk结果,但是当我使用write(fd,buff,1)时,没有printk的结果。device_write函数不能被调用什么会导致这个问题?有没有人遇到过这种问题?任何人都可以给我一些帮助和建议吗?
http://freshmeat.net/projects/dtrace-for-linux? – nmichaels 2010-12-07 17:40:43
我们需要更多的信息。什么是“价值”?你为什么认为写作不被称为?在你的问题中你没有这样的东西,代码甚至不可编译。 – Falmarri 2010-12-07 17:40:54