[Pdbg] [PATCH v2 17/22] libpdbg: Do not make pdbg_default_dtb public

Amitay Isaacs amitay at ozlabs.org
Fri Sep 20 15:16:46 AEST 2019


Applications should never need to know the default fdt to be used.
For some reason applications need to get access to the fdt blob, we can
add appropriate public api.

Signed-off-by: Amitay Isaacs <amitay at ozlabs.org>
---
 libpdbg/dtb.c     | 1 +
 libpdbg/libpdbg.h | 1 -
 libpdbg/target.h  | 1 +
 3 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/libpdbg/dtb.c b/libpdbg/dtb.c
index 92a4efb..ec2b672 100644
--- a/libpdbg/dtb.c
+++ b/libpdbg/dtb.c
@@ -27,6 +27,7 @@
 #include <errno.h>
 
 #include "libpdbg.h"
+#include "target.h"
 
 #include "fake.dt.h"
 
diff --git a/libpdbg/libpdbg.h b/libpdbg/libpdbg.h
index 64db5b9..371af05 100644
--- a/libpdbg/libpdbg.h
+++ b/libpdbg/libpdbg.h
@@ -108,7 +108,6 @@ void pdbg_target_release(struct pdbg_target *target);
 enum pdbg_target_status pdbg_target_status(struct pdbg_target *target);
 void pdbg_target_status_set(struct pdbg_target *target, enum pdbg_target_status status);
 bool pdbg_set_backend(enum pdbg_backend backend, const char *backend_option);
-void *pdbg_default_dtb(void);
 uint32_t pdbg_target_index(struct pdbg_target *target);
 char *pdbg_target_path(struct pdbg_target *target);
 struct pdbg_target *pdbg_target_from_path(struct pdbg_target *target, const char *path);
diff --git a/libpdbg/target.h b/libpdbg/target.h
index 7419ce5..0d47edb 100644
--- a/libpdbg/target.h
+++ b/libpdbg/target.h
@@ -63,6 +63,7 @@ bool pdbg_target_is_class(struct pdbg_target *target, const char *class);
 extern struct list_head empty_list;
 extern struct list_head target_classes;
 
+void *pdbg_default_dtb(void);
 const char *pdbg_get_backend_option(void);
 
 struct sbefifo *pib_to_sbefifo(struct pdbg_target *target);
-- 
2.21.0



More information about the Pdbg mailing list