diff --git a/linux-ramdump-parser-v2/ramdump.py b/linux-ramdump-parser-v2/ramdump.py index feb9f6a890cf898a9533db8e10b3cb7330b76167..10af03725cd90aeea57c8eb22bce16d87ed8044e 100644 --- a/linux-ramdump-parser-v2/ramdump.py +++ b/linux-ramdump-parser-v2/ramdump.py @@ -496,6 +496,7 @@ class RamDump(): self.phys_offset = options.phys_offset self.lookup_table = [] self.config = [] + self.config_dict = {} if self.arm64: self.page_offset = 0xffffffc000000000 self.thread_size = 16384 @@ -618,8 +619,14 @@ class RamDump(): os.remove(zconfig.name) for l in t: self.config.append(l.rstrip().decode('ascii', 'ignore')) + if not l.startswith('#') and l.strip() != '': + cfg, val = l.split('=') + self.config_dict[cfg] = val.strip() return True + def get_config_val(self, config): + return self.config_dict.get(config) + def is_config_defined(self, config): s = config + '=y' return s in self.config