1
0
mirror of https://github.com/ARM-software/devlib.git synced 2025-01-31 10:10:46 +00:00

LinuxTarget: Port forbidden char fix from WA2

Fix for Chromebook Plus and possibly other devices - removes forbidden
characters from the device_model such as the null character.
This commit is contained in:
Marc Bonnici 2017-12-07 15:10:24 +00:00 committed by setrofim
parent 857edbd48b
commit e414a3a193

View File

@ -782,7 +782,8 @@ class LinuxTarget(Target):
def model(self):
if self.file_exists("/proc/device-tree/model"):
raw_model = self.execute("cat /proc/device-tree/model")
return '_'.join(raw_model.split()[:2])
device_model_to_return = '_'.join(raw_model.split()[:2])
return device_model_to_return.rstrip(' \t\r\n\0')
return None
def __init__(self,