[Pdbg] [PATCH v4 25/30] libpdbg: Do not make pdbg_default_dtb public

Amitay Isaacs amitay at ozlabs.org
Thu Oct 3 14:19:04 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>
Reviewed-by: Alistair Popple <alistair at popple.id.au>
---
 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 1f70d1c..e19ce95 100644
--- a/libpdbg/dtb.c
+++ b/libpdbg/dtb.c
@@ -28,6 +28,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 3e4d03b..9cef3b7 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 df4f3f8..0422406 100644
--- a/libpdbg/target.h
+++ b/libpdbg/target.h
@@ -64,6 +64,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