diff mbox series

[v3,10/22] libpdbg: Probe should traverse virtual nodes also

Message ID 20190923084841.18057-11-amitay@ozlabs.org
State Superseded
Headers show
Series Add system device tree to libpdbg | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success Successfully applied on branch master (da6691975ea6a06d79cfd2ba9a7a1af39f839a41)
snowpatch_ozlabs/build-multiarch success Test build-multiarch on branch master

Commit Message

Amitay Isaacs Sept. 23, 2019, 8:48 a.m. UTC
This ensures that the virtual nodes have correct status in the system
device tree view.

Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
Reviewed-by: Alistair Popple <alistair@popple.id.au>
---
 libpdbg/target.c | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/libpdbg/target.c b/libpdbg/target.c
index e5aa92b..6e90f5e 100644
--- a/libpdbg/target.c
+++ b/libpdbg/target.c
@@ -412,6 +412,11 @@  enum pdbg_target_status pdbg_target_probe(struct pdbg_target *target)
 		}
 	}
 
+	/* Make sure any virtual nodes are also probed */
+	if (target->compatible && target->vnode) {
+		pdbg_target_probe(target->vnode);
+	}
+
 	/* At this point any parents must exist and have already been probed */
 	if (target->probe && target->probe(target)) {
 		/* Could not find the target */