{"id":2232787,"url":"http://patchwork.ozlabs.org/api/1.2/patches/2232787/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/patch/20260505-ufetch-net-v3-2-eee5eb9ca5ce@cherry.de/","project":{"id":18,"url":"http://patchwork.ozlabs.org/api/1.2/projects/18/?format=json","name":"U-Boot","link_name":"uboot","list_id":"u-boot.lists.denx.de","list_email":"u-boot@lists.denx.de","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20260505-ufetch-net-v3-2-eee5eb9ca5ce@cherry.de>","list_archive_url":null,"date":"2026-05-05T09:14:32","name":"[v3,2/2] cmd: ufetch: only show comma separator if there was a previous feature","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"fc12b17b5b9104cb995b0267b96f8656463ab602","submitter":{"id":84425,"url":"http://patchwork.ozlabs.org/api/1.2/people/84425/?format=json","name":"Quentin Schulz","email":"foss+uboot@0leil.net"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/uboot/patch/20260505-ufetch-net-v3-2-eee5eb9ca5ce@cherry.de/mbox/","series":[{"id":502792,"url":"http://patchwork.ozlabs.org/api/1.2/series/502792/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/list/?series=502792","date":"2026-05-05T09:14:31","name":"cmd: ufetch: print Net feature when NET_LWIP=y, prettyfy if NET=n","version":3,"mbox":"http://patchwork.ozlabs.org/series/502792/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2232787/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2232787/checks/","tags":{},"related":[],"headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=0leil.net header.i=@0leil.net header.a=rsa-sha256\n header.s=20231125 header.b=b1mfo+Wu;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)","phobos.denx.de;\n dmarc=pass (p=reject dis=none) header.from=0leil.net","phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de","phobos.denx.de;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=0leil.net header.i=@0leil.net header.b=\"b1mfo+Wu\";\n\tdkim-atps=neutral","phobos.denx.de;\n dmarc=pass (p=reject dis=none) header.from=0leil.net","phobos.denx.de;\n spf=pass smtp.mailfrom=foss+uboot@0leil.net"],"Received":["from phobos.denx.de (phobos.denx.de\n [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g8tBv2XxFz1yJV\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 05 May 2026 19:15:03 +1000 (AEST)","from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 7A27E8486B;\n\tTue,  5 May 2026 11:14:45 +0200 (CEST)","by phobos.denx.de (Postfix, from userid 109)\n id B531E84882; Tue,  5 May 2026 11:14:44 +0200 (CEST)","from smtp-42a9.mail.infomaniak.ch (smtp-42a9.mail.infomaniak.ch\n [84.16.66.169])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id 065BF8486A\n for <u-boot@lists.denx.de>; Tue,  5 May 2026 11:14:41 +0200 (CEST)","from smtp-4-0001.mail.infomaniak.ch (unknown\n [IPv6:2001:1600:7:10::a6c])\n by smtp-4-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4g8tBS5SNLz7CV;\n Tue,  5 May 2026 11:14:40 +0200 (CEST)","from unknown by smtp-4-0001.mail.infomaniak.ch (Postfix) with ESMTPA\n id 4g8tBS0w8kz3tS; Tue,  5 May 2026 11:14:40 +0200 (CEST)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,\n DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED,\n RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS\n autolearn=ham autolearn_force=no version=3.4.2","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=0leil.net;\n s=20231125; t=1777972480;\n bh=YbK2U5VoPiwZeEtgJulACscMJx0zK+IsWeOUb6ldhgY=;\n h=From:Date:Subject:References:In-Reply-To:To:Cc:From;\n b=b1mfo+WuZrKuQeeeSPFshMkHAoZBcDSyPqfMnA8dKGwHKfKw81XAw5OQzYiNYMclF\n lFKd0dAnnTdya2QT7p9XFu6RJROGfoOf1iL4GYxIJw19C7iswmfYmGY5OnlAABail6\n kTML9Pw8QU/6iudNxc6E4IVnu1Mc0GOW/etcSLAETtCSk1Wl3YvYNVGuOcS1WfG2ai\n vKdkCfA5HM3iAk6ENcsCrtfysvcVWQBBhxDlZ0pl5+tkQFmEjSgOCOp8Qaajwo1KhO\n 0QbO/QgwV3AujXPDkWYXnkXyyClzyUJLS51FPy8/uI7KNzgZuQskp43EQ9/lAJ4kSk\n 9OImAQ3Z7c3yA==","From":"Quentin Schulz <foss+uboot@0leil.net>","Date":"Tue, 05 May 2026 11:14:32 +0200","Subject":"[PATCH v3 2/2] cmd: ufetch: only show comma separator if there was\n a previous feature","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"7bit","Message-Id":"<20260505-ufetch-net-v3-2-eee5eb9ca5ce@cherry.de>","References":"<20260505-ufetch-net-v3-0-eee5eb9ca5ce@cherry.de>","In-Reply-To":"<20260505-ufetch-net-v3-0-eee5eb9ca5ce@cherry.de>","To":"u-boot@lists.denx.de","Cc":"Casey Connolly <casey.connolly@linaro.org>,\n Tom Rini <trini@konsulko.com>,\n Ilias Apalodimas <ilias.apalodimas@linaro.org>,\n Andrew Goodbody <andrew.goodbody@linaro.org>,\n Peter Robinson <pbrobinson@gmail.com>,\n Heinrich Schuchardt <xypron.glpk@gmx.de>, Simon Glass <sjg@chromium.org>,\n Quentin Schulz <quentin.schulz@cherry.de>","X-Mailer":"b4 0.15-dev-47773","X-Infomaniak-Routing":"alpha","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.39","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<https://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>","X-Virus-Scanned":"clamav-milter 0.103.8 at phobos.denx.de","X-Virus-Status":"Clean"},"content":"From: Quentin Schulz <quentin.schulz@cherry.de>\n\nCurrently, if NET is disabled, the next feature to be printed will start\nwith a comma and a space which is not pretty. Add the comma and\nwhitespace only when a previous feature has already been shown.\n\nSigned-off-by: Quentin Schulz <quentin.schulz@cherry.de>\n---\n cmd/ufetch.c | 29 ++++++++++++++++++++---------\n 1 file changed, 20 insertions(+), 9 deletions(-)","diff":"diff --git a/cmd/ufetch.c b/cmd/ufetch.c\nindex bc5db08eee1..e7b5d773f5e 100644\n--- a/cmd/ufetch.c\n+++ b/cmd/ufetch.c\n@@ -157,26 +157,37 @@ static int do_ufetch(struct cmd_tbl *cmdtp, int flag, int argc,\n \t\t\t\tprintf(\" (%d baud)\", gd->baudrate);\n \t\t\tputc('\\n');\n \t\t\tbreak;\n-\t\tcase FEATURES:\n+\t\tcase FEATURES: {\n+\t\t\tconst char *sep = \"\";\n+\n \t\t\tprintf(\"Features:\" RESET \" \");\n-\t\t\tif (IS_ENABLED(CONFIG_NET))\n-\t\t\t\tprintf(\"Net\");\n-\t\t\tif (IS_ENABLED(CONFIG_EFI_LOADER))\n-\t\t\t\tprintf(\", EFI\");\n-\t\t\tif (IS_ENABLED(CONFIG_CMD_CAT))\n-\t\t\t\tprintf(\", cat :3\");\n+\t\t\tif (IS_ENABLED(CONFIG_NET)) {\n+\t\t\t\tprintf(\"%sNet\", sep);\n+\t\t\t\tsep = \", \";\n+\t\t\t}\n+\t\t\tif (IS_ENABLED(CONFIG_EFI_LOADER)) {\n+\t\t\t\tprintf(\"%sEFI\", sep);\n+\t\t\t\tsep = \", \";\n+\t\t\t}\n+\t\t\tif (IS_ENABLED(CONFIG_CMD_CAT)) {\n+\t\t\t\tprintf(\"%scat :3\", sep);\n+\t\t\t\tsep = \", \";\n+\t\t\t}\n #ifdef CONFIG_ARM64\n \t\t\tswitch (current_el()) {\n \t\t\tcase 2:\n-\t\t\t\tprintf(\", VMs\");\n+\t\t\t\tprintf(\"%sVMs\", sep);\n+\t\t\t\tsep = \", \";\n \t\t\t\tbreak;\n \t\t\tcase 3:\n-\t\t\t\tprintf(\", full control!\");\n+\t\t\t\tprintf(\"%sfull control!\", sep);\n+\t\t\t\tsep = \", \";\n \t\t\t\tbreak;\n \t\t\t}\n #endif\n \t\t\tprintf(\"\\n\");\n \t\t\tbreak;\n+\t\t}\n \t\tcase RELOCATION:\n \t\t\tif (gd->flags & GD_FLG_SKIP_RELOC)\n \t\t\t\tprintf(\"Relocated:\" RESET \" no\\n\");\n","prefixes":["v3","2/2"]}