From 08cfef61b88233f0095da86130748540ddbb3451 Mon Sep 17 00:00:00 2001 From: Patrick Daly <pdaly@codeaurora.org> Date: Tue, 27 Sep 2016 16:28:49 -0700 Subject: [PATCH] lrdpv2: Fix path issues with autodump the paths used by the T32 launcher used the incorrect directory when the autodump option was passed. Additionally, fix an issue where not all of the files detected by autodump are printed out. Change-Id: Id96500e6a59961aa1d06af515560b367a42f2e5b --- linux-ramdump-parser-v2/ramdump.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/linux-ramdump-parser-v2/ramdump.py b/linux-ramdump-parser-v2/ramdump.py index f10685b..a4a7bf1 100755 --- a/linux-ramdump-parser-v2/ramdump.py +++ b/linux-ramdump-parser-v2/ramdump.py @@ -67,11 +67,12 @@ class AutoDumpInfo(object): for (filename, base_addr) in self._parse(): fullpath = os.path.join(self.autodumpdir, filename) end = base_addr + os.path.getsize(fullpath) - 1 - self.ebi_files.append((open(fullpath, 'rb'), base_addr, end, filename)) + self.ebi_files.append((open(fullpath, 'rb'), base_addr, end, fullpath)) # sort by addr, DDR files first. The goal is for # self.ebi_files[0] to be the DDR file with the lowest address. - self.ebi_files.sort(key=lambda x: (x[-1] not in DDR_FILE_NAMES, - x[1])) + self.ebi_files.sort( + key=lambda x: (os.path.basename(x[-1]) not in DDR_FILE_NAMES, + x[1])) def _parse(self): # Implementations should return an interable of (filename, base_addr) @@ -797,7 +798,7 @@ class RamDump(): for (f, start, end, filename) in self.ebi_files: print_out_str('Adding {0} {1:x}--{2:x}'.format( filename, start, end)) - return True + return True self.ebi_files = None return False -- GitLab