Unmentioned, but implied, was issue of inconsistency between text and binary data. You can set text values with echo, but binary data is rather less convenient. Supporting structured data, whether it's done with an XML, C, or other syntax makes good sense. It allows a consistent snapshot to be taken and reduces the number of system calls that must be done to open, read, and close sysfs multiple one-per-attribute files. It should be mandatory that names and types of attributes mustn't change, though allowing attributes to be added, deleted or even reordered should also be supported.
Posted Mar 18, 2010 13:06 UTC (Thu) by bcopeland (subscriber, #51750)
[Link]
If only there were some way to get structured binary data out of the kernel in an agreed-upon format... hrm, I know, let's call it ioctl!
A critical look at sysfs attribute values
Posted Mar 22, 2010 15:36 UTC (Mon) by jzbiciak (✭ supporter ✭, #5246)
[Link]
Hmmm... yes, because ioctl() has always been self-documenting and never problematic, particularly on dual-ABI machines such as x86-64. ;-) (Not to mention TOCTTOU issues with multithreaded programs.)