From patchwork Thu Nov 20 02:55:53 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 746 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1763607436; bh=GKAs2QfWy7YgcuLiX3hJskYzkYEt/8l2S0CyDm7eQ/I=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=O6CUk32B5JOQf8LgXyf1ens+f/lVjcz+fbAjGn0PgsZ9GFKBJnsbj6T2Kdu8onull WpT21ty21/AYVnXjnbJB/8ym4hoD3NhsHl1x5YCQi0oBu6ZbcVAqV2SyqKHmMnMWVX 5Hr3+aMtXzvF40BiEsZczVLemvCOVJaL5kp5p41H5DsUpbUPOldNLBxTCVyepzinwX TIBgg4QqrxI/t5jmzJRP3PJ5h5apzXOdE/na/WphOxOhTOVehMTMzxHBhHi6f9BgKO FgvdavmD05YGIWAZR2QyLUAwGXc3hlRcPKG4kyVdx5GGjPXhEbuebv99LI9PsDHKrE Ynp/YXW3ZUzng== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 12D2E686DF for ; Wed, 19 Nov 2025 19:57:16 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id m-3Txev4jwUu for ; Wed, 19 Nov 2025 19:57:16 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1763607434; bh=GKAs2QfWy7YgcuLiX3hJskYzkYEt/8l2S0CyDm7eQ/I=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=bVVl4VyOKA5wyL4EAFN9WplwIYEUSItGBIlo750LDGmlhYfPOhaBb4v0ZOmFsYgok +MKanZT85eW8ScGDQDf+5VVLO7m9HpSnBLwYOA7OCCH7fiei2urnhIyQQt5aW28mb2 WW2k/FZF53zUV3R5pfjhW7cxXB33BKaFX9MH1RjaQnXYFjg9XM+up73dgNw7Vt9YtA UOvh7rvcc6Quq0Sw8ONtbASde8hl0V7umaNgyvGEYk/TkmRR2jQsgYFl9WhWdkgk+N YsE1RaJn6UYi870aAmLoMEc17QIwg3y7+luK+LeUQiQLUk2peISNB8R16kt8EKD0Fy nvQWr0KtMrgXw== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 32147686EE for ; Wed, 19 Nov 2025 19:57:14 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1763607429; bh=cR9T6o848dnPTznc1waeoALBuSoQUvR8lE9yjWdkAG8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VBAATZFVqm/B0Whx/+7xy1QvPZySBET69FRm0NBEAoYb5epIVKBTxsfYyr8zts/AG rNrp23xpvqaX9TtJjJHvWpRMNuwmJv+5x1U1I7fYpDywGTEZLd4zMOjV0hRKSXfzld F+Qc1/OJyoNT+J5U25bmGsdE3idalnUZHPCIAJS2UDyHtRhqvU6xuqIpbZUJXbD2HC dV2YG48gl9cH5y6xp8S1dPpodnlU6fQ8A86IppZJz+rGOEACXh+lXbrXZosgaH6Vha b0jLcByIhLhXHIdN17JWe8o0BvWT2O45NUkm86/F6FoiacWAlkfUr+1vXFMtODwEr1 zpe9BkRChLrEQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id AFDBC68654; Wed, 19 Nov 2025 19:57:09 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id LKYkDgTtXphS; Wed, 19 Nov 2025 19:57:09 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1763607429; bh=UTR5L8uq7PlKCdOTxj3zi6TQ8RqEMk2Z7RpHxWTYVbs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=R7bxeY5vrYFSmiRxvX1UXU634JsU5zW79mDaZv8XsC7Jfhyn7BB5DwRoByvKnVbQ/ 1sQc+vSNlklbwxF99Ue2gNqVJP+XJPGmEQTdoX0YxClLtkOyNJh/q2sLQ8Efs9f6bH PEtAcaWHslpffYWhSlL5FDpVucXrO8pFCGJfbboY6ynqjAzJlS2Y53IN7pbzzkioWr TyD572Sgu3qtU784eOUdHlf+XHuteFscTcZI/+dZnoG5ckbCjrgY5SczEbQckzaYOs TEWGOnso3I1lyb8JCMFOdCnUIkxQnSmNL4E8dH/DGEMJQjA3wcG4fI+3N5KDfDxrHp OSBCA5u0JhYlg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 1FC0568614; Wed, 19 Nov 2025 19:57:09 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Wed, 19 Nov 2025 19:55:53 -0700 Message-ID: <20251120025614.2215587-19-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251120025614.2215587-1-sjg@u-boot.org> References: <20251120025614.2215587-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: AYFTZIJDH7JDF2P5KZ6NO5B4MUOUENWJ X-Message-ID-Hash: AYFTZIJDH7JDF2P5KZ6NO5B4MUOUENWJ X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Heinrich Schuchardt , Simon Glass , Claude X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 18/30] fit: Use emit_label() helper in fit_conf_print() List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass Update fit_conf_print() to use the emit_label() helper function for printing labels. Co-developed-by: Claude Signed-off-by: Simon Glass --- boot/fit_print.c | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/boot/fit_print.c b/boot/fit_print.c index 69139c46931..97dab4b2490 100644 --- a/boot/fit_print.c +++ b/boot/fit_print.c @@ -312,16 +312,18 @@ static void fit_conf_print(struct fit_print_ctx *ctx, int noffset) const char *uname, *desc; int ret, ndepth, i; + ctx->tab = 19; + /* Mandatory properties */ ret = fit_get_desc(fit, noffset, &desc); - printf("%s Description: ", p); + emit_label(ctx, "Description"); if (ret) printf("unavailable\n"); else printf("%s\n", desc); uname = fdt_getprop(fit, noffset, FIT_KERNEL_PROP, NULL); - printf("%s Kernel: ", p); + emit_label(ctx, "Kernel"); if (!uname) printf("unavailable\n"); else @@ -329,27 +331,33 @@ static void fit_conf_print(struct fit_print_ctx *ctx, int noffset) /* Optional properties */ uname = fdt_getprop(fit, noffset, FIT_RAMDISK_PROP, NULL); - if (uname) - printf("%s Init Ramdisk: %s\n", p, uname); + if (uname) { + emit_label(ctx, "Init Ramdisk"); + printf("%s\n", uname); + } uname = fdt_getprop(fit, noffset, FIT_FIRMWARE_PROP, NULL); - if (uname) - printf("%s Firmware: %s\n", p, uname); + if (uname) { + emit_label(ctx, "Firmware"); + printf("%s\n", uname); + } for (i = 0; uname = fdt_stringlist_get(fit, noffset, FIT_FDT_PROP, i, NULL), uname; i++) { if (!i) - printf("%s FDT: ", p); + emit_label(ctx, "FDT"); else printf("%s ", p); printf("%s\n", uname); } uname = fdt_getprop(fit, noffset, FIT_FPGA_PROP, NULL); - if (uname) - printf("%s FPGA: %s\n", p, uname); + if (uname) { + emit_label(ctx, "FPGA"); + printf("%s\n", uname); + } /* Print out all of the specified loadables */ for (i = 0; @@ -357,7 +365,7 @@ static void fit_conf_print(struct fit_print_ctx *ctx, int noffset) i, NULL), uname; i++) { if (!i) - printf("%s Loadables: ", p); + emit_label(ctx, "Loadables"); else printf("%s ", p); printf("%s\n", uname); @@ -367,7 +375,7 @@ static void fit_conf_print(struct fit_print_ctx *ctx, int noffset) for (i = 0; uname = fdt_stringlist_get(fit, noffset, FIT_COMPATIBLE_PROP, i, NULL), uname; i++) { if (!i) - printf("%s Compatible: ", p); + emit_label(ctx, "Compatible"); else printf("%s ", p); printf("%s\n", uname);