Skip to content
Snippets Groups Projects
Unverified Commit c99215a8 authored by Martijn Braam's avatar Martijn Braam
Browse files

Don't try to open readonly sysfs nodes in tweakd

parent 476573fb
No related branches found
No related tags found
No related merge requests found
......@@ -88,6 +88,7 @@ class Setting:
self.key = definition['key']
self.stype = definition['stype']
self.multiplier = definition['multiplier'] if 'multiplier' in definition else 1
self.readonly = definition['readonly'] if 'readonly' in definition else False
elif self.backend == 'osksdl':
self.needs_root = True
self.key = definition['key']
......
......@@ -21,7 +21,7 @@ def main(version, datadir=None):
for section in settings[page]['sections']:
for setting in settings[page]['sections'][section]['settings']:
s = settings[page]['sections'][section]['settings'][setting]
if s.backend == 'sysfs':
if s.backend == 'sysfs' and not s.readonly:
whitelist_sysfs.append(s.key)
# Read the stored settings and apply them
......
......@@ -26,4 +26,5 @@
type: info
stype: int
backend: sysfs
key: /sys/firmware/devicetree/base/memory/ram_freq
\ No newline at end of file
key: /sys/firmware/devicetree/base/memory/ram_freq
readonly: true
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment