diff mbox series

[4/5] libpdbg: Add an api to get device-tree node name

Message ID 20180816055756.1011374-4-amitay@ozlabs.org
State Accepted
Headers show
Series [1/5] libpdbg: Remove unused variable | expand

Checks

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

Commit Message

Amitay Isaacs Aug. 16, 2018, 5:57 a.m. UTC
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
---
 libpdbg/libpdbg.c | 5 +++++
 libpdbg/libpdbg.h | 1 +
 2 files changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/libpdbg/libpdbg.c b/libpdbg/libpdbg.c
index b801e5a..522bec9 100644
--- a/libpdbg/libpdbg.c
+++ b/libpdbg/libpdbg.c
@@ -127,6 +127,11 @@  char *pdbg_target_name(struct pdbg_target *target)
 	return target->name;
 }
 
+const char *pdbg_target_dn_name(struct pdbg_target *target)
+{
+	return target->dn_name;
+}
+
 void pdbg_set_target_property(struct pdbg_target *target, const char *name, const void *val, size_t size)
 {
 	struct dt_property *p;
diff --git a/libpdbg/libpdbg.h b/libpdbg/libpdbg.h
index a5a52b3..56dd03a 100644
--- a/libpdbg/libpdbg.h
+++ b/libpdbg/libpdbg.h
@@ -89,6 +89,7 @@  uint32_t pdbg_target_index(struct pdbg_target *target);
 uint32_t pdbg_parent_index(struct pdbg_target *target, char *klass);
 char *pdbg_target_class_name(struct pdbg_target *target);
 char *pdbg_target_name(struct pdbg_target *target);
+const char *pdbg_target_dn_name(struct pdbg_target *target);
 void *pdbg_target_priv(struct pdbg_target *target);
 void pdbg_target_priv_set(struct pdbg_target *target, void *priv);
 struct pdbg_target *pdbg_target_root(void);