On Thu, May 13, 2010 at 07:51:05AM +0800, Marek Lindner wrote:
The others are all single-value files, right? Or did I miss something? If they are single-value files, then yes, they can stay in sysfs, unless you feel they are debug-type things, then debugfs is the place for them (debugfs makes is trivial to handle single value files, even easier than sysfs.)
Well, now that you mention it .. :-) Next to the sysfs interface batman creates a file in /dev (/dev/batman-adv at the moment) that is used to inject (debug) packets into the mesh from user space. Due to our ongoing mesh abstraction effort we would need to create one file per virtual mesh which is little bit messy in /dev (although doable). I'd like to get it out of there - can/should we move it to debugfs ? The initial reason to choose /dev was the ability get the open() and close() syscalls because we need to maintain a state for each user.
Yes, that sounds like debugfs might work for you there.
Just remember the one rule of debugfs: There are no rules for debugfs
If you are ok with that, then by all means, use it :)
thanks,
greg k-h