projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
arm: stm32mp: improve the error message for smc
[oweals/u-boot.git]
/
tools
/
moveconfig.py
diff --git
a/tools/moveconfig.py
b/tools/moveconfig.py
index 36160a3977260ce4c5a54092007ae63b11df21ce..d8bf7fd0717fe1c405317e9e5ea95698a50ecefc 100755
(executable)
--- a/
tools/moveconfig.py
+++ b/
tools/moveconfig.py
@@
-295,6
+295,7
@@
To see the complete list of supported options, run
"""
"""
+import asteval
import collections
import copy
import difflib
import collections
import copy
import difflib
@@
-808,10
+809,11
@@
def try_expand(line):
return line
try:
return line
try:
+ aeval = asteval.Interpreter( usersyms=SIZES, minimal=True )
cfg, val = re.split("=", line)
val= val.strip('\"')
if re.search("[*+-/]|<<|SZ_+|\(([^\)]+)\)", val):
cfg, val = re.split("=", line)
val= val.strip('\"')
if re.search("[*+-/]|<<|SZ_+|\(([^\)]+)\)", val):
- newval = hex(
eval(val, SIZES
))
+ newval = hex(
aeval(val
))
print("\tExpanded expression %s to %s" % (val, newval))
return cfg+'='+newval
except:
print("\tExpanded expression %s to %s" % (val, newval))
return cfg+'='+newval
except:
@@
-1215,7
+1217,7
@@
class Slot:
"Failed to process.\n")
if self.options.verbose:
self.log += color_text(self.options.color, COLOR_LIGHT_CYAN,
"Failed to process.\n")
if self.options.verbose:
self.log += color_text(self.options.color, COLOR_LIGHT_CYAN,
- self.ps.stderr.read())
+ self.ps.stderr.read()
.decode()
)
self.finish(False)
def do_defconfig(self):
self.finish(False)
def do_defconfig(self):