From patchwork Tue Dec 23 01:16:26 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1070 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=1766452631; bh=32VEegwt5MfDxvKjrznz1d08ayIXoxTigp0wz2CGHC8=; 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=G/ntqR+vyWzDELNFtFVAy9ndzr45KZtegGgcr31LP0BDiy461suE79o76xZIsRePp YrD1HLvMvKF9mBmukgIYHD26NybexgPbFf9SWuzI6A8Vz8f4nfmyMd9RnIG6+lSIrr PSIH/6Xec4P5ItbAXPSqo5NIvpIRQlfB2yvedwYFFkiyd4++hhpq5GFBPB24XDcAD9 M8TGWEcIAXjubySDNn5C2idfjuXP98DJEH2WR9Coa00eKlWP1VzAnnstqACPRDVbVk qlWprGPnzHpEf1xMROk3w2YtvKbrhY6//1M0tcwf5eIZbPtcGgBDrH8+WhxZx4yZNt nNdt1+BYJFrpQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 9B42C64DA9 for ; Mon, 22 Dec 2025 18:17:11 -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 fyRzn3Vnt3Ym for ; Mon, 22 Dec 2025 18:17:11 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1766452630; bh=32VEegwt5MfDxvKjrznz1d08ayIXoxTigp0wz2CGHC8=; 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=L2WgarDnmT7hBakQD+rsV72JqZBEB+X/cBnuKOnbZFiNosATlI9ypMrAcID1Tn7hJ TwswpvhaAufP1BOqkJvlvlAGQnALqR2zXB2BagBBMMhihwB7JTrAP/vcYXpg5LnoT6 gEbksY1dfBz9iE5ehnGD9wtl8HcIuBVNj16w08VG7lPA7PRuM2PlZR1aWWdAorUXJi vCibaK+BidSzkT4cIBAFJdk+pJZH9STqghp9aBcdrmRhjJ+dkM8nQzJPr+tjoX2j6z futF/aVvnhO3HBinic/yJnBgQnLtycllTaLgNout2X4vPQSixnbX3Ot1XU7Uk1gheT dghFKuGQi4HuQ== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id DE3E064DB3 for ; Mon, 22 Dec 2025 18:17:10 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1766452628; bh=WvrddjaA1rkQ9uHk3Ecmjrd0TiRW7xLjW8gxbZBhCjg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nmiCb2X7GKzVb5dOHYU6PGT1wwzdKiZ+PdP4Z00b8N7v7eB6TaHKEjUOBFKxpbUBs NvXbA6W+eBC261hyBBmca4d+tX3aDQJxCkPeCJGFXEV2Z4YFcF+u08gCgKYvWVULK6 R2tWhqXxq5RdWsPil+6FhubDYXIkpsD1/ZuxoNuLSTILKTFEj6ANub0PqMpTy/Kf82 oUYUdeDrQm/Nlgpikvy/cnblc/Vzi64O6BvnatBvXXQ8eeVsFRXiVMIP9O0HbSi1pu zwpz0yU5qaDGGzXQ/9KlTk1vwRfOEJ+vXBweam0uCznbL0DWK7/bPpnnFEqMQMM/dH 8bdXAkBcSn2VQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id C029C64D43; Mon, 22 Dec 2025 18:17:08 -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 qUrQeyZDSSHg; Mon, 22 Dec 2025 18:17:08 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1766452628; bh=Pxlo5TRq25jHX33Dg8lpfYIAVicgF41GoBmHnGytOmA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dO3HTBMTZ4j4uHE8IQLBIifTntf9Np63F8tpqrkNLq1fh7FmF12Qqopfg+A88E2u5 3m68GzmzFgsOQw+YoUTHyVMIYXbCZfPSXKx2FIbqHKYzViJkncPhBTYChdDgueZ+hi sdASFOrgmU8o7Rfu5sYMWjUWPvg+6YVe9l3Z6REYgBUMi2P4fdkGRypH+o0+3Tv0Mp 4K0qnG3J9Ua1D98Afm3MYVPudjNc4phpTZuatdOBD8x1b/FLsL3fTJ9qbXZ6Usa6+L /0pjvS8Pr3Hlp4s05if96Opt7FzP7/kKEQAhYoyanv/JHtdGY6T/PXC2fYJlqRCUcY WtHgm6rHVapBA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 3A9F464C17; Mon, 22 Dec 2025 18:17:08 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Mon, 22 Dec 2025 18:16:26 -0700 Message-ID: <20251223011632.380026-12-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251223011632.380026-1-sjg@u-boot.org> References: <20251223011632.380026-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: O3EX4Z4DU2UQ6DWEKR5EDPUCBRWO3LTH X-Message-ID-Hash: O3EX4Z4DU2UQ6DWEKR5EDPUCBRWO3LTH 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 , "Claude Opus 4 . 5" X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 11/12] ext4l: Fix dir_emit() to call the actor callback 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 dir_emit() macro was stubbed to do nothing, which meant directory listing would never output any entries. Replace it with a proper inline function that calls ctx->actor() to emit each directory entry. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- fs/ext4l/ext4_uboot.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h index 116f0475217..52f479e9673 100644 --- a/fs/ext4l/ext4_uboot.h +++ b/fs/ext4l/ext4_uboot.h @@ -1703,8 +1703,12 @@ extern struct inode *iget_locked(struct super_block *sb, unsigned long ino); #define inode_eq_iversion(i, v) ({ (void)(i); (void)(v); 1; }) #define inode_query_iversion(i) ({ (void)(i); 0ULL; }) -/* Directory context operations */ -#define dir_emit(ctx, name, len, ino, type) ({ (void)(ctx); (void)(name); (void)(len); (void)(ino); (void)(type); 1; }) +/* Directory context operations - call the actor callback */ +static inline bool dir_emit(struct dir_context *ctx, const char *name, int len, + u64 ino, unsigned int type) +{ + return ctx->actor(ctx, name, len, ctx->pos, ino, type) == 0; +} #define dir_relax_shared(i) ({ (void)(i); 1; }) /* File llseek */