mirror of
				https://github.com/ARM-software/devlib.git
				synced 2025-11-04 07:51:21 +00:00 
			
		
		
		
	modules/sched: Use correct permissions to read debugfs
Use target.list_directory(as_root=target.is_rooted) instead of doing it as a normal user for paths in /sys/kernel/debug. Since this list_directory() call can be used with multiple path, we do not force as_root=True but we increase the chance of it working.
This commit is contained in:
		
				
					committed by
					
						
						Marc Bonnici
					
				
			
			
				
	
			
			
			
						parent
						
							a65189f028
						
					
				
				
					commit
					f6bbd2c187
				
			@@ -329,7 +329,7 @@ class SchedProcFSData(SchedProcFSNode):
 | 
				
			|||||||
        except TargetStableError:
 | 
					        except TargetStableError:
 | 
				
			||||||
            return False
 | 
					            return False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        cpus = target.list_directory(path)
 | 
					        cpus = target.list_directory(path, as_root=target.is_rooted)
 | 
				
			||||||
        if not cpus:
 | 
					        if not cpus:
 | 
				
			||||||
            return False
 | 
					            return False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user