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