作者lucy1012 (busy)
看板LinuxDev
標題[問題] input node read/write問題
時間Thu Dec 11 09:20:43 2014
各位大德好,
我在Linux上實作一個input node, 透過下面的方法.
#define DEVICE_ATTR(_name, _mode, _show, _store) \
struct device_attribute dev_attr_##_name = __ATTR(_name, _mode, _show, _store)
但遇到一個問題是, 對這個node下read/write之後,
只有第一次下有效, 第二次之後就不會呼叫到Linux kernel裡的show和store方法了...
有從google看到下面的link有一些資訊, 但讀過後還是不太了解意思..
https://www.kernel.org/doc/Documentation/filesystems/sysfs.txt
想請教各位大德 :)
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 60.250.185.98
※ 文章網址: http://webptt.com/m.aspx?n=bbs/LinuxDev/M.1418260847.A.C4C.html
1F:推 alongalone: 是沒呼叫到?還是沒顯示結果? 這兩個不太一樣 12/11 19:34