We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a564050 commit 0aeb5bcCopy full SHA for 0aeb5bc
devlib/target.py
@@ -168,9 +168,10 @@ def number_of_cpus(self):
168
@memoized
169
def number_of_nodes(self):
170
num_nodes = 0
171
- nodere = re.compile(r'^\s*node\d+\s*$')
172
- output = self.execute('ls /sys/devices/system/node', as_root=self.is_rooted)
173
- for entry in output.split():
+ nodere = re.compile(r'^\./node\d+\s*$')
+ cmd = 'cd /sys/devices/system/node && {busybox} find . -maxdepth 1'.format(busybox=quote(self.busybox))
+ output = self.execute(cmd, as_root=self.is_rooted)
174
+ for entry in output.splitlines():
175
if nodere.match(entry):
176
num_nodes += 1
177
return num_nodes
0 commit comments