From 21ef8a6accae3f6f2a9cb30efcb2d269466bff0b Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Tue, 16 May 2017 15:38:34 -0500 Subject: [PATCH] dts/extract_dts_includes.py: Quote strings values If the value of the property is a string quote it on output. This lets us use things like label properties that will have values of strings. Signed-off-by: Kumar Gala --- scripts/extract_dts_includes.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/extract_dts_includes.py b/scripts/extract_dts_includes.py index 00f00fbf595..1a8ec006e89 100755 --- a/scripts/extract_dts_includes.py +++ b/scripts/extract_dts_includes.py @@ -380,10 +380,14 @@ def extract_single(node_address, yaml, prop, key, prefix, defs, def_label): for i, p in enumerate(prop): k = convert_string_to_label(key).upper() label = def_label + '_' + k + if isinstance(p, str): + p = "\"" + p + "\"" prop_def[label + '_' + str(i)] = p else: k = convert_string_to_label(key).upper() label = def_label + '_' + k + if isinstance(prop, str): + prop = "\"" + prop + "\"" prop_def[label] = prop if node_address in defs: