public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* sysfs binary attribute API flux
@ 2012-03-22 20:38 Jonathan McCune
  2012-03-22 21:28 ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Jonathan McCune @ 2012-03-22 20:38 UTC (permalink / raw)
  To: linux-kernel; +Cc: Jonathan M. McCune

Greetings,

I maintain a Linux kernel module for a research project*, where it is
necessary to move some binary data from userspace into the kernel. I
have been using sysfs's 'struct bin_attribute'.  Unfortunately, every
few kernel versions, my code breaks because of a change in the
definition of some elements in this struct.  For example, kernel
versions 2.6.20, 2.6.32, and 2.6.38 each define the 'read' and 'write'
function pointers differently. I will spare the inline diff, but they
can each be seen here:

http://lxr.linux.no/linux+v2.6.32.59/include/linux/sysfs.h#L65
http://lxr.linux.no/linux+v2.6.38.8/include/linux/sysfs.h#L88
http://lxr.linux.no/linux+v2.6.20.21/include/linux/sysfs.h#L54

My question: is there some other interface that I should be using?  Am
I using sysfs incorrectly?  All of the documentation I've been able to
find seems to strongly encourage the use of sysfs.

http://kernel.org/doc/Documentation/filesystems/sysfs.txt

cc appreciated in reply.

Many thanks,
-Jon

* http://flickertcb.sourceforge.net/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-03-23 19:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-22 20:38 sysfs binary attribute API flux Jonathan McCune
2012-03-22 21:28 ` Greg KH
2012-03-23 13:25   ` Jonathan McCune
2012-03-23 16:20     ` Greg KH
2012-03-23 19:10       ` Jonathan McCune

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox