-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Search for path of property-value pair #10
Comments
So you need to find path for a given node? IMO it's a really artificial use case. |
The scenario is that |
@alilee, gotcha. I see it like that: let reader = unsafe { Reader::read_from_address(pdtb as usize).unwrap(); }
let (prop, _) = reader.struct_items().path_struct_items("/interrupt-parent").next().unwrap();
let phandle = prop.value_u32().unwrap(); // I think we don't have `value_u32()`, I would add it.
let (node, iter) = reader.find_phandle(phandle).unwrap(); Pretty straightforward implementation using |
Nice work!
Do you have any thoughts on adding some search functionality like this?
The text was updated successfully, but these errors were encountered: