mirror of
https://github.com/ARM-software/devlib.git
synced 2025-01-31 10:10:46 +00:00
module/thermal: List directories with as_root=target.is_rooted
Listing thermal zones directories in sysfs fails one some system when running as non-root. Signed-off-by: Douglas RAILLARD <douglas.raillard@arm.com>
This commit is contained in:
parent
6b72b50c40
commit
207291e940
@ -48,7 +48,7 @@ class ThermalZone(object):
|
|||||||
self.path = target.path.join(root, self.name)
|
self.path = target.path.join(root, self.name)
|
||||||
self.trip_points = {}
|
self.trip_points = {}
|
||||||
|
|
||||||
for entry in self.target.list_directory(self.path):
|
for entry in self.target.list_directory(self.path, as_root=target.is_rooted):
|
||||||
re_match = re.match('^trip_point_([0-9]+)_temp', entry)
|
re_match = re.match('^trip_point_([0-9]+)_temp', entry)
|
||||||
if re_match is not None:
|
if re_match is not None:
|
||||||
self.add_trip_point(re_match.group(1))
|
self.add_trip_point(re_match.group(1))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user