From patchwork Wed Jun 24 04:38:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amitay Isaacs X-Patchwork-Id: 1315841 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) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49s9R76B9Bz9sSJ for ; Wed, 24 Jun 2020 14:39:31 +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=nLJo7SXJ; 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 49s9R650HFzDqd0 for ; Wed, 24 Jun 2020 14:39:30 +1000 (AEST) X-Original-To: pdbg@lists.ozlabs.org Delivered-To: pdbg@lists.ozlabs.org Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) (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 49s9Qm0s2czDqcx for ; Wed, 24 Jun 2020 14:39:12 +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=nLJo7SXJ; 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 49s9Ql5blhz9sSc; Wed, 24 Jun 2020 14:39:11 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ozlabs.org; s=201707; t=1592973551; bh=Q3yyoseWphTP/ZnmcpKwduIgiYJNeRo2CASGAbGHA/c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nLJo7SXJuL50pX2U/amIcxxG9hPilChZtXri9wKxpfQGiv5q56PEbl3JLT+LGq3hW E0DMNPQTMTTP3RefU0D64NRyyknR0cVg3HhrXGylJEfdsx/lUotSgwGIeEoy60QbV3 bsXZMQvu5NXdt+fCOHiv7KZTsl0eS+Ru1opd09uTX60u3/DfY37aa2lgBFgJOk+bsR bq67iViEiNzPccFOKUX5HSVhDwoTOTJtCFZvPcLLSn4zm5OPC7bn3hbKHHmxMMuEao mvmkipD0g8+qKWS3vwHWol/5DqVnRWGofoTLR3W7zBrstkhAVBwlJdYjnR0VolFCQk mZ9vOLS40Od7A== From: Amitay Isaacs To: pdbg@lists.ozlabs.org Date: Wed, 24 Jun 2020 14:38:55 +1000 Message-Id: <20200624043856.175528-4-amitay@ozlabs.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200624043856.175528-1-amitay@ozlabs.org> References: <20200624043856.175528-1-amitay@ozlabs.org> MIME-Version: 1.0 Subject: [Pdbg] [PATCH 3/4] main: Print enabled top-level targets during probe 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 --- src/main.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/main.c b/src/main.c index 5a5616d..032bcd8 100644 --- a/src/main.c +++ b/src/main.c @@ -520,21 +520,6 @@ static bool parse_options(int argc, char *argv[]) return true; } -static bool child_enabled(struct pdbg_target *target) -{ - struct pdbg_target *child; - - pdbg_for_each_child_target(target, child) { - if (child_enabled(child)) - return true; - - if (pdbg_target_status(child) == PDBG_TARGET_ENABLED) - return true; - } - - return false; -} - static void print_target(struct pdbg_target *target, int level) { int i; @@ -542,9 +527,6 @@ static void print_target(struct pdbg_target *target, int level) enum pdbg_target_status status; const char *classname; - if (level == 0 && !child_enabled(target)) - return; - /* Does this target actually exist? */ status = pdbg_target_status(target); if (status != PDBG_TARGET_ENABLED)