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

target/page_size_kb: Handle missing KernelPageSize

On some systems KernelPageSize is not exported therefore
in this case return 0.
This commit is contained in:
Marc Bonnici 2020-11-04 17:56:12 +00:00 committed by setrofim
parent 345a9ed199
commit 98bc0a31e1

View File

@ -215,7 +215,7 @@ class Target(object):
@memoized @memoized
def page_size_kb(self): def page_size_kb(self):
cmd = "cat /proc/self/smaps | {0} grep KernelPageSize | {0} head -n 1 | {0} awk '{{ print $2 }}'" cmd = "cat /proc/self/smaps | {0} grep KernelPageSize | {0} head -n 1 | {0} awk '{{ print $2 }}'"
return int(self.execute(cmd.format(self.busybox))) return int(self.execute(cmd.format(self.busybox)) or 0)
@property @property
def shutils(self): def shutils(self):