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

Alistair Popple alistair at popple.id.au
Mon Sep 23 13:51:40 AEST 2019


On Friday, 20 September 2019 3:16:46 PM AEST Amitay Isaacs wrote:
> 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.

Yeah, I think we added this back when the application would have to pass in 
the tree to use rather than being able to pass in NULL to pdbg_targets_init().

Reviewed-by: Alistair Popple <alistair at popple.id.au>
 
> 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);
> 






More information about the Pdbg mailing list