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 16:35 UTC (Wed) by fjpop (guest, #30115)
Parent article: A critical look at sysfs attribute values

Another thing that's inconsistent is how input is accepted. In a lot of
cases a new value can be set by simply doing 'echo 1 >file', but in other
cases you need to suppress the newline and do 'echo -n 1 >file'.


(Log in to post comments)

A critical look at sysfs attribute values

Posted Mar 18, 2010 4:01 UTC (Thu) by hmh (subscriber, #3838) [Link]

That's considered a bug. You're supposed to eat all whitespace before AND after whatever you want to parse in a write to a sysfs attribute, and error out if there is any crap at the end.


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