View Single Post
blubbi's Avatar
Posts: 288 | Thanked: 113 times | Joined on Dec 2009 @ Germany
#20
Originally Posted by Joorin View Post
Polling a file under /sys typically makes no sense. The files you find there act as handy nameholders for different parts of drivers and doing open + read + close makes the driver create the content on the fly.

So, do not view this as regular files but as something you can read from and get the latest value. There is often a library to use to do the same thing which might be faster since opening and reading from a file is a magnitude slower than performing one break into kernel space with an ioctl.
I guess my question is superfluous since you probably would have provided the info which lib to use, but:

Do you have a idea how I can access the file correctly?



Cheers
Bjoern