From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 31E15C76196 for ; Sat, 1 Apr 2023 10:20:45 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 411428584D; Sat, 1 Apr 2023 12:20:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=canonical.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.b="rM+0s3IN"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8DE3185936; Sat, 1 Apr 2023 12:20:39 +0200 (CEST) Received: from smtp-relay-canonical-0.canonical.com (smtp-relay-canonical-0.canonical.com [185.125.188.120]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 135B0858F1 for ; Sat, 1 Apr 2023 12:20:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=canonical.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=heinrich.schuchardt@canonical.com Received: from LT2ubnt.fritz.box (ip-088-152-145-137.um26.pools.vodafone-ip.de [88.152.145.137]) (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 smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPSA id ECEE93F26A; Sat, 1 Apr 2023 10:20:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1680344436; bh=wg8UhqUFtZX57o3mwCeTf06Qbo1iQrgKZSip2cvKLRI=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=rM+0s3INwSTW6naKUHP9W8Ej5w7mFqPABvUNgJwKC5FIranuQUQTElZrMeE590OdF 57PUr/WcKu2Heqc3k7ZPgAjDCh64XaCPAbZF6d6OKIqK88b5Jdj2kzAc277mLUPz23 5KpRcvKjC/stLVSnqvYTO/5gLmNt4BYQIWBNNV04N2bnz1rXqFPHgT+REM+vSQWgug FqzEkydXe/8lV4Tg1GLEc5VgDqGl69sLlFUIwDXyRwcEt3KY5ubIcEkn8WRTBodPD/ zD1IwkoxZnqvJIXhxTx7zUkZsRl4+U7rEXsTD4iCXyhHAGpVGJz2jrQj6MPZ2iBuwB OqE0iSOwdB8og== From: Heinrich Schuchardt To: Tom Rini Cc: Simon Glass , u-boot@lists.denx.de, Heinrich Schuchardt Subject: [PATCH 1/1] cmd: consider multiplexing in coninfo Date: Sat, 1 Apr 2023 12:20:34 +0200 Message-Id: <20230401102034.50269-1-heinrich.schuchardt@canonical.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean If console multiplexing in enabled (CONFIG_CONSOLE_MUX=y), the output of the coninfo command should show the file association (stdin, stderr, stdout) for all devices not only the default ones. Signed-off-by: Heinrich Schuchardt --- cmd/console.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/cmd/console.c b/cmd/console.c index 620a961cde..58c2cf1c89 100644 --- a/cmd/console.c +++ b/cmd/console.c @@ -9,6 +9,7 @@ */ #include #include +#include #include extern void _do_coninfo (void); @@ -33,9 +34,15 @@ static int do_coninfo(struct cmd_tbl *cmd, int flag, int argc, (dev->flags & DEV_FLAGS_OUTPUT) ? "O" : ""); for (l = 0; l < MAX_FILES; l++) { - if (stdio_devices[l] == dev) { - printf("| |-- %s\n", stdio_names[l]); + if (CONFIG_IS_ENABLED(CONSOLE_MUX)) { + if (iomux_match_device(console_devices[l], + cd_count[l], dev) >= 0) + printf("| |-- %s\n", stdio_names[l]); + } else { + if (stdio_devices[l] == dev) + printf("| |-- %s\n", stdio_names[l]); } + } } return 0; -- 2.39.2