diff mbox series

[v2,03/19] libpdbg: Add an api to get current backend

Message ID 20200407061613.21325-4-amitay@ozlabs.org
State Superseded
Headers show
Series Add sbefifo backend | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch warning Failed to apply on branch master (8b4611b5d8e7e2279fe4aa80c892fcfe10aa398d)
snowpatch_ozlabs/apply_patch fail Failed to apply to any branch

Commit Message

Amitay Isaacs April 7, 2020, 6:15 a.m. UTC
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
---
 libpdbg/dtb.c    | 5 +++++
 libpdbg/target.h | 1 +
 2 files changed, 6 insertions(+)

Comments

Alistair Popple April 9, 2020, 2:13 a.m. UTC | #1
We don't export this to applications, but then we also shouldn't need it from 
there so can export it if/when we ever find a use case.

Reviewed-by: Alistair Popple <alistair@popple.id.au>

On Tuesday, 7 April 2020 4:15:57 PM AEST Amitay Isaacs wrote:
> Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
> ---
>  libpdbg/dtb.c    | 5 +++++
>  libpdbg/target.h | 1 +
>  2 files changed, 6 insertions(+)
> 
> diff --git a/libpdbg/dtb.c b/libpdbg/dtb.c
> index b094e34..70b7962 100644
> --- a/libpdbg/dtb.c
> +++ b/libpdbg/dtb.c
> @@ -293,6 +293,11 @@ bool pdbg_set_backend(enum pdbg_backend backend, const
> char *backend_option) return true;
>  }
> 
> +enum pdbg_backend pdbg_get_backend(void)
> +{
> +	return pdbg_backend;
> +}
> +
>  const char *pdbg_get_backend_option(void)
>  {
>  	return pdbg_backend_option;
> diff --git a/libpdbg/target.h b/libpdbg/target.h
> index 3b74844..7094b51 100644
> --- a/libpdbg/target.h
> +++ b/libpdbg/target.h
> @@ -80,6 +80,7 @@ extern struct list_head empty_list;
>  extern struct list_head target_classes;
> 
>  struct pdbg_dtb *pdbg_default_dtb(void *system_fdt);
> +enum pdbg_backend pdbg_get_backend(void);
>  const char *pdbg_get_backend_option(void);
>  bool pdbg_fdt_is_readonly(void *fdt);
diff mbox series

Patch

diff --git a/libpdbg/dtb.c b/libpdbg/dtb.c
index b094e34..70b7962 100644
--- a/libpdbg/dtb.c
+++ b/libpdbg/dtb.c
@@ -293,6 +293,11 @@  bool pdbg_set_backend(enum pdbg_backend backend, const char *backend_option)
 	return true;
 }
 
+enum pdbg_backend pdbg_get_backend(void)
+{
+	return pdbg_backend;
+}
+
 const char *pdbg_get_backend_option(void)
 {
 	return pdbg_backend_option;
diff --git a/libpdbg/target.h b/libpdbg/target.h
index 3b74844..7094b51 100644
--- a/libpdbg/target.h
+++ b/libpdbg/target.h
@@ -80,6 +80,7 @@  extern struct list_head empty_list;
 extern struct list_head target_classes;
 
 struct pdbg_dtb *pdbg_default_dtb(void *system_fdt);
+enum pdbg_backend pdbg_get_backend(void);
 const char *pdbg_get_backend_option(void);
 bool pdbg_fdt_is_readonly(void *fdt);