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

Using sysfs for configuring wireless networking

Using sysfs for configuring wireless networking

Posted Jan 14, 2006 12:38 UTC (Sat) by fergal (guest, #602)
In reply to: Using sysfs for configuring wireless networking by akumria
Parent article: Linux and wireless networking

t = open(">/sys/blah/transaction")
... # write lots of new values
write(t, "commit")
close(t)

write(t, "rollback") or just closing the filehandle without writing "commit" would cause the new values to be discarded. Until the commit, everything else sees the old values. No danger from crashing programs, just kill them and start a new transaction. There are issues about concurrent updates to multiple parts of /sys but that'll be true in any system that provides atomic updates for multiple values.


(Log in to post comments)


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