From patchwork Wed Jun 10 05:24:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1306456 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49hb5w421jz9sRR for ; Wed, 10 Jun 2020 15:24:52 +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=Q0SqbCq1; dkim-atps=neutral Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 49hb5v5Z7PzDqXs for ; Wed, 10 Jun 2020 15:24:51 +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) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 49hb5d4V8HzDqMC for ; Wed, 10 Jun 2020 15:24:37 +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=Q0SqbCq1; 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 49hb5d1HZpz9sSS; Wed, 10 Jun 2020 15:24:37 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1591766677; bh=r2pb+0fYN39MWH36Y/QEiaZe0FPLfOs9m7jT+UoOUwc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q0SqbCq1+l6Desg6bYhwc6CmgF/6UsEPmcmA9MqdC+oKqBOPheSILtlbcCi/JJysX 6bRVP4DzMGoqgHEeCYrOEZlBAZruGt59LZtcZzsKtrtxxdD7NNDmWATlnu/XiSBZEb lY5JagD1bEwi75iRtr+xMbyRdM9mvIRrX0P9h1jTqkXIYzEZTFVZb/IO+9VjCohzQ+ fMJr0TonibfuG+aXDSHtMej5A/GcAWGIKgwGCtutUM3P9D/eV+ffDhylOw9LjGK4TW n2Re6za1AIx7DvfXRN7sZjtjc3nCghmTSUF23jdRY9vBGXQI1MQIf6ZucMm6w8+ebo x4+NO01gotxaA== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Wed, 10 Jun 2020 15:24:21 +1000 Message-Id: <20200610052426.150225-3-amitay@ozlabs.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200610052426.150225-1-amitay@ozlabs.org> References: <20200610052426.150225-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH v2 2/7] libpdbg: Do not hard-code fsi device path 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/kernel.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libpdbg/kernel.c b/libpdbg/kernel.c index 7914e50..2cc81f2 100644 --- a/libpdbg/kernel.c +++ b/libpdbg/kernel.c @@ -147,12 +147,16 @@ int kernel_fsi_probe(struct pdbg_target *target) int tries = 5; int rc; const char *kernel_path = kernel_get_fsi_path(); + const char *fsi_path; char *path; if (!kernel_path) return -1; - rc = asprintf(&path, "%s/fsi0/slave@00:00/raw", kernel_get_fsi_path()); + fsi_path = pdbg_target_property(target, "device-path", NULL); + assert(fsi_path); + + rc = asprintf(&path, "%s%s", kernel_get_fsi_path(), fsi_path); if (rc < 0) { PR_ERROR("Unable create fsi path\n"); return rc;