Skip to content

Commit 88e3f4f

Browse files
committed
zephyr-build: Fix dt node names
Fix the DT node names in the generated `dt_cfgs` entries to match the names of the nodes. Need to apply `fix_id` in a few places to make sure non-identifier characters are converted to underscores. Signed-off-by: David Brown <[email protected]>
1 parent 1e99cea commit 88e3f4f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

zephyr-build/src/devicetree/output.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ impl Node {
150150
writeln!(write, "{}", child_name)?;
151151

152152
for prop in &child.properties {
153-
prop.output_path(write, &child_name)?;
153+
prop.output_path(write, &fix_id(&child_name))?;
154154
}
155155

156156
child.output_path_walk(write, Some(&child_name))?;
@@ -175,7 +175,7 @@ impl Property {
175175
fn output_path<W: Write>(&self, write: &mut W, name: &str) -> Result<()> {
176176
if let Some(value) = self.get_single_value() {
177177
if let Value::Phandle(_) = value {
178-
writeln!(write, "{}::{}", name, self.name)?;
178+
writeln!(write, "{}::{}", name, fix_id(&self.name))?;
179179
}
180180
}
181181
Ok(())

0 commit comments

Comments
 (0)