From patchwork Sat Oct 26 06:40:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 2002713 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=vzHdTk8Y; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Xb96371T8z1xw0 for ; Sat, 26 Oct 2024 17:41:15 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8CDD189011; Sat, 26 Oct 2024 08:41:04 +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="vzHdTk8Y"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 45C2389011; Sat, 26 Oct 2024 08:41:03 +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.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from smtp-relay-canonical-1.canonical.com (smtp-relay-canonical-1.canonical.com [185.125.188.121]) (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 3FD9E88D94 for ; Sat, 26 Oct 2024 08:41:01 +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.c.hoisthospitality.com (unknown [87.215.50.114]) (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-1.canonical.com (Postfix) with ESMTPSA id C2AFB3F391; Sat, 26 Oct 2024 06:40:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1729924860; bh=On3OPkhIguMBHEz6y9JxTHgVn6DsHAgDcg1h8qbeSE4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=vzHdTk8YAcdZRXZ6Ky4KMHqDtg52f8z0mixreleyD2xisWeZ6oCm2x6RKg7jpp4d5 cfBsE6WBEgFEJqPvqVSID6xwd95O4ap+kXI41QZS2LjdYW3wdXojYQp/QlBgrI0Jij oic9dbbO/Ij16lgOdQgdAX8HCSLOPZKHXZb/G2QfHlCoTo56mXr3p2YdC1XtB9q/wK nJ3KCdkBYHQuykLPuxg2Ysh2uLej0c2Ko0K04eCyCZNSgo5O0PSrwCdMDyyBlIYC7X VtMHvusdp/pfpMZlu+9HGE9nZyaS1Bwhi5fumE1CeiQ6FdIFYwpOy8eSKKetUYmZ4I 3Uf/hBbsCqh8w== From: Heinrich Schuchardt To: Tom Rini Cc: Ilias Apalodimas , Richard Weinberger , Marek Vasut , Sean Anderson , Caleb Connolly , Simon Glass , Sughosh Ganu , AKASHI Takahiro , u-boot@lists.denx.de, Heinrich Schuchardt Subject: [PATCH 0/5] fs: ext4: implement opendir, readdir, closedir Date: Sat, 26 Oct 2024 08:40:43 +0200 Message-ID: <20241026064048.370062-1-heinrich.schuchardt@canonical.com> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 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 With this series opendir, readdir, closedir are implemented for ext4. These functions are needed for the UEFI sub-system to interact with the ext4 file system. To reduce code growth the functions are reused to implement the ls command for ext4. A memory leak in ext4fs_exists is resolved. ext4fs_iterate_dir is simplified by removing a redundant pointer copy. Heinrich Schuchardt (5): fs: ext4: simplify ext4fs_iterate_dir() fs: ext4: free directory node in ext4fs_exists() fs: ext4: implement opendir, readdir, closedir efi_loader: fix GetInfo and SetInfo fs: ext4: use fs_ls_generic fs/ext4/ext4_common.c | 48 ++------ fs/ext4/ext4fs.c | 177 +++++++++++++++++++++++++--- fs/fs.c | 6 +- include/ext4fs.h | 4 + lib/efi_loader/efi_file.c | 30 +++-- test/py/tests/test_env.py | 2 +- test/py/tests/test_fs/test_basic.py | 5 +- 7 files changed, 197 insertions(+), 75 deletions(-)