Commit c307a73e by Tim G

Check for errors from adb, may not work on all systems.

parent 285d4f3f
...@@ -1257,6 +1257,7 @@ class HPUX(Hardware): ...@@ -1257,6 +1257,7 @@ class HPUX(Hardware):
#adb output. Unfortunatley /dev/kmem doesn't have world-read, so this only works as root. #adb output. Unfortunatley /dev/kmem doesn't have world-read, so this only works as root.
if os.access("/dev/kmem", os.R_OK): if os.access("/dev/kmem", os.R_OK):
rc, out, err = module.run_command("echo 'phys_mem_pages/D' | adb -k /stand/vmunix /dev/kmem | tail -1 | awk '{print $2}'", use_unsafe_shell=True) rc, out, err = module.run_command("echo 'phys_mem_pages/D' | adb -k /stand/vmunix /dev/kmem | tail -1 | awk '{print $2}'", use_unsafe_shell=True)
if not err:
data = out data = out
self.facts['memtotal_mb'] = int(data) / 256 self.facts['memtotal_mb'] = int(data) / 256
else: else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment