Skip to content
Snippets Groups Projects
Commit 51a1f3e9 authored by Mitchel Humpherys's avatar Mitchel Humpherys
Browse files

lrdp-v2: rename RamDump.major to RamDump.kernel_version

`major' is a bit of a misnomer, since the variable also includes the
minor version and patch version.  Rename it to `kernel_version'.

Change-Id: Ic567131c7f12ab03c9dea2716242e9053c17372f
parent 5b2c241b
No related branches found
No related tags found
No related merge requests found
...@@ -74,7 +74,7 @@ class IrqParse(RamParser): ...@@ -74,7 +74,7 @@ class IrqParse(RamParser):
def radix_tree_lookup_element(self, ram_dump, root_addr, index): def radix_tree_lookup_element(self, ram_dump, root_addr, index):
rnode_offset = ram_dump.field_offset('struct radix_tree_root', 'rnode') rnode_offset = ram_dump.field_offset('struct radix_tree_root', 'rnode')
if (ram_dump.major[0], ram_dump.major[1]) >= (3, 18): if (ram_dump.kernel_version[0], ram_dump.kernel_version[1]) >= (3, 18):
rnode_height_offset = ram_dump.field_offset( rnode_height_offset = ram_dump.field_offset(
'struct radix_tree_node', 'path') 'struct radix_tree_node', 'path')
else: else:
...@@ -98,7 +98,7 @@ class IrqParse(RamParser): ...@@ -98,7 +98,7 @@ class IrqParse(RamParser):
node_addr = ram_dump.read_word(root_addr + rnode_offset) & 0xfffffffffffffffe node_addr = ram_dump.read_word(root_addr + rnode_offset) & 0xfffffffffffffffe
height = ram_dump.read_int(node_addr + rnode_height_offset) height = ram_dump.read_int(node_addr + rnode_height_offset)
if (ram_dump.major[0], ram_dump.major[1]) >= (3, 18): if (ram_dump.kernel_version[0], ram_dump.kernel_version[1]) >= (3, 18):
height = height & radix_tree_height_mask height = height & radix_tree_height_mask
if height > len(height_to_maxindex): if height > len(height_to_maxindex):
......
...@@ -466,7 +466,7 @@ class RamDump(): ...@@ -466,7 +466,7 @@ class RamDump():
self.ipc_log_debug = options.ipc_debug self.ipc_log_debug = options.ipc_debug
self.ipc_log_help = options.ipc_help self.ipc_log_help = options.ipc_help
self.use_stdout = options.stdout self.use_stdout = options.stdout
self.major = [0, 0, 0] self.kernel_version = [0, 0, 0]
if options.ram_addr is not None: if options.ram_addr is not None:
# TODO sanity check to make sure the memory regions don't overlap # TODO sanity check to make sure the memory regions don't overlap
for file_path, start, end in options.ram_addr: for file_path, start, end in options.ram_addr:
...@@ -634,7 +634,7 @@ class RamDump(): ...@@ -634,7 +634,7 @@ class RamDump():
self.version = v.group(1) self.version = v.group(1)
match = re.search('(\d+)\.(\d+)\.(\d+)', self.version) match = re.search('(\d+)\.(\d+)\.(\d+)', self.version)
if match is not None: if match is not None:
self.major[0], self.major[1], self.major[2] = map(int, match.groups()) self.kernel_version = map(int, match.groups())
else: else:
print_out_str('!!! Could not extract version info! {0}'.format(self.version)) print_out_str('!!! Could not extract version info! {0}'.format(self.version))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment