diff options
author | Simon Glass | 2017-01-15 21:09:08 -0700 |
---|---|---|
committer | Simon Glass | 2017-02-08 06:07:35 -0700 |
commit | 6b6024a3a2e0297267ad8bc0ad1dd03d6d04265a (patch) | |
tree | 1100f9ec9fd23dd8f149348d6569a91ee8f7e17f /tools/dtoc/dtoc.py | |
parent | e9b25f2ea1ef24a648f07feeb3604888bdca43e0 (diff) |
dtoc: Replace dot with underscore to avoid compiler errors
If there is a '.' in a compatible string, then dtoc will produce a struct
with a name containing a '.'. This won't work, so replace it with '_'.
Also add a suitable test to the sandbox device tree to catch this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/dtoc/dtoc.py')
-rwxr-xr-x | tools/dtoc/dtoc.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/dtoc/dtoc.py b/tools/dtoc/dtoc.py index 11050b66f71..6df7b0da13a 100755 --- a/tools/dtoc/dtoc.py +++ b/tools/dtoc/dtoc.py @@ -54,6 +54,7 @@ def Conv_name_to_c(name): str = name.replace('@', '_at_') str = str.replace('-', '_') str = str.replace(',', '_') + str = str.replace('.', '_') str = str.replace('/', '__') return str |