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:
parent
345a9ed199
commit
98bc0a31e1
@ -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):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user