User: Password:
|
|
Subscribe / Log in / New account

A critical look at sysfs attribute values

A critical look at sysfs attribute values

Posted Mar 17, 2010 23:17 UTC (Wed) by vomlehn (subscriber, #45588)
In reply to: A critical look at sysfs attribute values by Gollum
Parent article: A critical look at sysfs attribute values

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.


(Log in to post comments)

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 (subscriber, #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.)


Copyright © 2018, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds