Skip to content

Support finding nodes by name without address.#11

Merged
m4tx merged 1 commit into
mainfrom
nameaddress
Dec 15, 2025
Merged

Support finding nodes by name without address.#11
m4tx merged 1 commit into
mainfrom
nameaddress

Conversation

@qwandor

@qwandor qwandor commented Dec 12, 2025

Copy link
Copy Markdown
Collaborator

Many device tree nodes have names containing both a node-name and a unit-address component, like memory@40000000. It should be possible to find them by just the node-name.

Comment thread src/fdt/mod.rs
}

/// Finds a node by its path.
///

@m4tx m4tx Dec 15, 2025

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please include some documentation that will explain that the address component is optional, and an example based on test_children.dtb that will show that looking for /child2@42 and /child2 yields the same result.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment thread src/fdt/node.rs
}

/// Returns a child node by its name.
///

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto here

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Many device tree nodes have names containing both a node-name and a
unit-address component, like memory@40000000. It should be possible
to find them by just the node-name.
@m4tx m4tx merged commit d3d8b18 into main Dec 15, 2025
25 checks passed
@m4tx m4tx deleted the nameaddress branch December 15, 2025 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants