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

lrdp-v2: ramdump: Handle equals signs in config values

Currently we split each config line on the equals sign, assuming that
there's only one equals sign there.  This isn't a valid assumption for
cases like:

    CONFIG_CMDLINE="console=ttyAMA0"

Fix this by splitting at the first equals sign, rather than splitting
at *all* equals signs.

Change-Id: I01e44fe2e9a0f09a8bebdd76715002f6b12cf0b5
parent 621f112d
No related branches found
No related tags found
No related merge requests found
# Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
# Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 and
......@@ -604,7 +604,9 @@ class RamDump():
for l in t:
self.config.append(l.rstrip().decode('ascii', 'ignore'))
if not l.startswith('#') and l.strip() != '':
cfg, val = l.split('=')
eql = l.find('=')
cfg = l[:eql]
val = l[eql+1:]
self.config_dict[cfg] = val.strip()
return True
......
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