From patchwork Tue Aug 19 18:58:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 12 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=1755630047; bh=/DxLCam6FPSmrYPO8epaiMM7TEvrai8ll86wXXC4PQU=; 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=JguJo31ZCJOitn55kQKTp0ZTj4N3nJJhiUzvOOcZhQ07tMRTW4LoFhW9wxWHRCv6B XpeQUMxe4TaO52I6HLP8Il15sa4FwTMi8JV5NzYap5LIdtwu7eopfauybDYD3e3LdI vsJh2npe32nkf2LKxShcVN3Ar0ywXK92iV0Yr9SEm8wW4VNXE6hb+Zn7da14DOy27Q Oyn4PeSrDDdOwTgDtxisMCtscP/o+QCV2E1tiMeP8FrGUbStq6kwQ5xknCw3tX2yia PHwD/8VDkRBpckSlbLDN/2/+Ai7zOWPLu/+cas/R6naemTi3KIa0o8YS/G3Z8voZOY LEmBB/mw48kSw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id C7D2467607 for ; Tue, 19 Aug 2025 13:00:47 -0600 (MDT) 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 nkiBit8v7ClI for ; Tue, 19 Aug 2025 13:00:47 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755630046; bh=/DxLCam6FPSmrYPO8epaiMM7TEvrai8ll86wXXC4PQU=; 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=gXiZzA8y8CmA/qnbT3ByRZPmad1k12LwmoJAWKfku+LxwYnwugkxxeFW9mWWLXcTh PYFsvY7HDXKu6OWY+jTp08aH3bQhiJnrB6uaL45aeVUz3qm9lShAru3HQFfppw8rUa 2vGy5DswbTaHVcH3/nwVl39ZOlHBlj/OSky9faa/DtNpV0J4tBY8mprYDARW8/PpSy 5A5q8817Sz20hDc1rLIL/DJnc1mLbRYr7fSt5hHu6BySy0SecI6UPV34qvdE7m4+w0 7r1E3hkxBTszZjKRzAEs56g+bzq0+NWmdB2/i0pYQvpfNNWmg0qPOyginAskhQwPvT YFvP3eRQPcNwg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id CA54667608 for ; Tue, 19 Aug 2025 13:00:46 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755630044; bh=0dvwiQt2mGxv8DtiX/jWFZvfK0cB4Cn73BYhyozZr1Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gldfw5rI6SKK7ZXc+3DFSFuXvtbLMfO75sAgVHl0VbdDRGQqkMdY+Tmm0RqwKLSsc iNFxIfRQ27kimbKnEvBuUA/rB/rdYXl7PolTouqMm3zzZT0FALmrj2bcDFnK7L9vve VV8oYm+TiJZl3/y9TamqvOo8VFZKE5fDBUlxKBB/a3Jk7Q3N6ohrFyW47LqO4q2XOY yPZ3Fj31+3WEi9gONQrHsnioK2xOz6vELCPCN8f0W5HvGxyPN8TX7Mrb31Qwa3i41c IfI8imRdGm9DiPDLuDr1YaVH1tNaGirbfQ9F/mKtutLlMfCIuSd11iMRkA6JrbXd2o dyoU5Hd/ZBwgA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id D25E2675F3; Tue, 19 Aug 2025 13:00:44 -0600 (MDT) 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 fVEvPtZudicq; Tue, 19 Aug 2025 13:00:44 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1755630043; bh=oSZShic5PR67eJgXCnFbTmy4/8gGhDxvI+R601AQPKA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QH4OsqNP5M7m0l5OYiA9pWLwlmglFD1X5D+6sbJ+0JgiM/5HUOTOUOmfSBpf8cGR9 8KOIny8TthbbLUf6aMV7a4NqMyWnBeA4K+iVXSo46mZg3dQ2JsNt7AnB4Eq1jxcAqS /6FYgRdoEn+r2BMj3N77Psg3Cs/uEIyXeMrjuEBpxKHcgmHhHbfNg8iOsc4JztAU8v FmBCzAt57Xazjw6RtEcgDbNjn9Xr/Ulg173lhj82H7aP+xEIQ/3pmaNoqfdaWyyvNT cRh4Box4X0k75iNipmp2BXsoNTs+/WBWs0NSB112lAoZRYjDUAnaOrUeAO6f0iCkns oJlCB5rWwc8zg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 9AD7F675F8; Tue, 19 Aug 2025 13:00:43 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Tue, 19 Aug 2025 12:58:41 -0600 Message-ID: <20250819185900.835939-11-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250819185900.835939-1-sjg@u-boot.org> References: <20250819185900.835939-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: UFRZH3TJPQHNPQMN2YVCV4RSSQBUCYEB X-Message-ID-Hash: UFRZH3TJPQHNPQMN2YVCV4RSSQBUCYEB 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: Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH v2 10/22] efi: app: Show only a summary of disks and partitions 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 The EFI app shows a list of every disk and partition it can find. On Qualcomm x1e laptops this can fill the screen. The information is not that useful, so just show a summary. Signed-off-by: Simon Glass --- (no changes since v1) lib/efi_client/efi_app_init.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/efi_client/efi_app_init.c b/lib/efi_client/efi_app_init.c index 938b16d14ab..7d30e79528f 100644 --- a/lib/efi_client/efi_app_init.c +++ b/lib/efi_client/efi_app_init.c @@ -128,6 +128,7 @@ static int setup_block(void) struct efi_device_path_to_text_protocol *text; struct efi_device_path *path; struct efi_block_io *blkio; + int num_disks, num_parts; efi_uintn_t num_handles; efi_handle_t *handle; int ret, i; @@ -150,7 +151,7 @@ static int setup_block(void) if (ret) return log_msg_ret("text", -ENOTSUPP); - for (i = 0; i < num_handles; i++) { + for (num_disks = 0, num_parts = 0, i = 0; i < num_handles; i++) { struct udevice *dev; const u16 *name; bool is_part; @@ -174,6 +175,7 @@ static int setup_block(void) is_part = devpath_is_partition(path); if (!is_part) { + num_disks++; len = util->get_device_path_size(path); ret = efi_bind_block(handle[i], blkio, path, len, &dev); if (ret) { @@ -183,15 +185,17 @@ static int setup_block(void) } } else { dev = NULL; + num_parts++; } /* * Show the device name if we created one. Otherwise indicate * that it is a partition. */ - printf("%2d: %-12s %ls\n", i, dev ? dev->name : "", - name); + log_debug("%2d: %-12s %ls\n", i, + dev ? dev->name : "", name); } + log_info("EFI: disks %d, partitions %d\n", num_disks, num_parts); boot->free_pool(handle); return 0;