Posted Mar 17, 2010 23:17 UTC (Wed) by vomlehn (subscriber, #45588)
[Link]
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.
A critical look at sysfs attribute values
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.)
A critical look at sysfs attribute values
Posted Mar 17, 2010 23:25 UTC (Wed) by yanfali (subscriber, #2949)
[Link]
YAML is also a nice simple structured text format, with a lot of available libraries.
A critical look at sysfs attribute values
Posted Mar 18, 2010 7:55 UTC (Thu) by ptman (subscriber, #57271)
[Link]
YAML (at least the latest revision of the spec) is a superset of JSON.
Better start simple and add complexity only if it is needed.
A critical look at sysfs attribute values
Posted Mar 19, 2010 11:19 UTC (Fri) by mgedmin (subscriber, #34497)
[Link]
I've read the YAML spec. I can never understand people who proclaim it to
be "simple". Even XML is simpler!
A critical look at sysfs attribute values
Posted Mar 21, 2010 21:08 UTC (Sun) by gerdesj (subscriber, #5446)
[Link]
I'll take your YAML or XML or whatever and raise you ASN.1. Heck, you could mount sysmibfs and make it legible - hilarious!
The latest modish markup thingie isn't going to solve the design goals of sysfs, let alone anything else.
I personally like the simple text file with a value in it approach - I don't have to learn Yet Another Markup Language (and I don't just mean YAML 8)
Re evaluating the goals and perhaps filling in the missing ones and then someone enforcing the end design decisions will give a chance for the grandkids to see this thing.
A critical look at sysfs attribute values
Posted Mar 18, 2010 12:29 UTC (Thu) by jengelh (subscriber, #33263)
[Link]
You want to submit that as an April Fool's patch :-)