From patchwork Fri Apr 17 07:07:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1272044 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 493RyP4X59z9sT0 for ; Fri, 17 Apr 2020 17:08:29 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.a=rsa-sha256 header.s=201707 header.b=SmbKF/me; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 493RyM1rrvzDrSF for ; Fri, 17 Apr 2020 17:08:27 +1000 (AEST) X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Received: from ozlabs.org (bilbo.ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 493Rxt6jvNzDqWn for ; Fri, 17 Apr 2020 17:08:02 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=ozlabs.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=ozlabs.org header.i=@ozlabs.org header.a=rsa-sha256 header.s=201707 header.b=SmbKF/me; dkim-atps=neutral Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 493Rxt0XYfz9sT3; Fri, 17 Apr 2020 17:08:02 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1587107282; bh=kLfqOhOnG/PGv9Tf6rtC6WZROaMWirPNRWnwWDJA2k0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SmbKF/medUcxbUucahLYT6Oii6niyd+L7SlTOIbd2jEO1VlYhiURYMVb2DeXyoeS7 cH4V7cme/sZtCy2J7N9rUI0/zZpvU0ZZu/nYpR9+JxlcjuZfVprbcRLyyinTLjJejN CJd6pmn9Ak5WjqRnkjqzyWHM6y0Fg0PL5tC8qDoacWcKPfa7PfLWKg1UGIaqTtMFyp gXPb3i5DyMxZhP8gw4rSZ81Mvmv324D0Dza/t5C9+ryQK/gUbUy4cxlSCDzQZxyJT0 OAt1tUBxTxzHAELPP1RYay9YPdkPCZDfKZc/V/oWFE/z2sLOfyTClFy0HcICDuSEfo ucGXJun4FBk7A== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Fri, 17 Apr 2020 17:07:27 +1000 Message-Id: <20200417070749.276754-4-amitay@ozlabs.org> X-Mailer: git-send-email 2.25.2 In-Reply-To: <20200417070749.276754-1-amitay@ozlabs.org> References: <20200417070749.276754-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v3 03/25] libpdbg: Add a private api to get current backend X-BeenThere: pdbg@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "mailing list for https://github.com/open-power/pdbg development" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Amitay Isaacs Errors-To: pdbg-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Pdbg" Signed-off-by: Amitay Isaacs Reviewed-by: Alistair Popple --- 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);