From patchwork Mon Jan 19 06:15:04 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1613 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=1768803376; bh=HInUyPZZXrzCVYw18DFJmWfFByqxogZ+yFcXbQop4d0=; 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=ClPd0Nnf4mcH07Q1uq6dimvEbOrM5AkpW4JkuTQYK4/zGzpXDoQV77OIGkAK21xFR 2RsCGOTa86Xupzl9cl+472r6uuin4a19HqhhmY1lgiqQ14gEs7nkUtNkppluUvAXpW qaXkkftJZy2GzMyPcdMXmXgHUY0+RbrEUNRZFiHkN+V6bQYOEKYLxRycKEO+Wh4xqR pLgZyAoZ+Y/4K9k9UQsWQc3YvIB5ufpdabFbRQjv2AMfYhFEPv+ci+sSSSyRQUgIpf HXZR38EoPD8AiB0Ow9PN/St5AAldOUGrGKxtbtzKgSG23r78FnTGU9kx0cmYvKoCy/ PFoQBc7g2sN1g== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 20B21694D3 for ; Sun, 18 Jan 2026 23:16: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 ZC4WZ0_fUyIA for ; Sun, 18 Jan 2026 23:16:16 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768803376; bh=HInUyPZZXrzCVYw18DFJmWfFByqxogZ+yFcXbQop4d0=; 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=ClPd0Nnf4mcH07Q1uq6dimvEbOrM5AkpW4JkuTQYK4/zGzpXDoQV77OIGkAK21xFR 2RsCGOTa86Xupzl9cl+472r6uuin4a19HqhhmY1lgiqQ14gEs7nkUtNkppluUvAXpW qaXkkftJZy2GzMyPcdMXmXgHUY0+RbrEUNRZFiHkN+V6bQYOEKYLxRycKEO+Wh4xqR pLgZyAoZ+Y/4K9k9UQsWQc3YvIB5ufpdabFbRQjv2AMfYhFEPv+ci+sSSSyRQUgIpf HXZR38EoPD8AiB0Ow9PN/St5AAldOUGrGKxtbtzKgSG23r78FnTGU9kx0cmYvKoCy/ PFoQBc7g2sN1g== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 0183F6938F for ; Sun, 18 Jan 2026 23:16:16 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768803373; bh=59hFN0o9Y1+raTNSFY3xP3ZuohSMk4+YRPC8quStLqs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KiVLXQeUxGHljOZLzl+fNgHgb292TiyTY9Lp35U29ackFCi/WFtotibfD1HGQCh5k uY4ErCpnVEHXkneWAA2tdaucHMdfk1BhO9FIyft7jvCg+WTk8JlGvI+48PjOSj4VdB faiajyGnrKi8Khb0BKpYZvwXGKDIasfoT8VNVKl0EyHMdivp+1NvSqTIXoxZnVoUrM Li7a9z+esoFCHlk/UxHDAEfqooCbHkkbv6UghDMwbwjByBEdYdRU0bQQeqIELy9Tqk +QOgqs425LdsXyRqVjMjVPjfv7Oolc8I0p2KboGZn80QXPoOaghCitoW8uR1QHP6cD /L9xwDzhx5wWQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id AE91D6938F; Sun, 18 Jan 2026 23:16:13 -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 phEWBxoqwe0o; Sun, 18 Jan 2026 23:16:13 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768803369; bh=G54qqsU04Q3BRTxidla5w7PvC7LHi+xhgu5FkvXGE9E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bl25DmgoGUcvSS6osgEGKWAhdOh+iMemxa0mNyS/ggqSoA0IpiECPJBs4u6MyZO0h zM+GBa2vmSasx3i03+tx78JxU1kixaDa7EeUjtxYdZkeTqFvBjdqKmC0bIbHActI4d 0J1PfkUEiBKPtKijB+Qt/mhIuKHTuTbS5q/eX9ynVfW4mn13dodLSPhply8+MxQnf4 bxVqpLpWxmd6JZw68sDmifWaozcz67NLAdPh/k1rFxDviz8myXZp8+FIlHzm3mfTFC 2KCP1so932/0cuEtBCCiytB5Rqf/28Ms7UgbpZ9DkmzJ4O46hCTpK1I9iAmEf2SFZt pv31fj8vCtLfA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 571A2693AE; Sun, 18 Jan 2026 23:16:09 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Sun, 18 Jan 2026 23:15:04 -0700 Message-ID: <20260119061529.3383191-7-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260119061529.3383191-1-sjg@u-boot.org> References: <20260119061529.3383191-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: J3S3SKDRVGKDONCO5TSILXQJ6RJL547Q X-Message-ID-Hash: J3S3SKDRVGKDONCO5TSILXQJ6RJL547Q 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 06/23] linux: Add namei.h with pathname lookup flags 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 Create linux/namei.h with LOOKUP_* flags for pathname resolution operations used by filesystem code. Update ext4_uboot.h to use linux/namei.h instead of duplicating the LOOKUP_FOLLOW definition. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- fs/ext4l/ext4_uboot.h | 4 ++-- include/linux/namei.h | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 include/linux/namei.h diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h index 35d1c8125df..0b1778ad0a6 100644 --- a/fs/ext4l/ext4_uboot.h +++ b/fs/ext4l/ext4_uboot.h @@ -1254,8 +1254,8 @@ void ext4_unregister_li_request(struct super_block *sb); /* Timer and timing stubs are in linux/jiffies.h */ -/* Path lookup flags */ -#define LOOKUP_FOLLOW 0x0001 +/* Path lookup flags - use linux/namei.h */ +#include /* I/O priority classes */ #define IOPRIO_CLASS_BE 2 diff --git a/include/linux/namei.h b/include/linux/namei.h new file mode 100644 index 00000000000..7b66fb242d6 --- /dev/null +++ b/include/linux/namei.h @@ -0,0 +1,26 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Pathname lookup definitions for U-Boot + * + * Based on Linux namei.h - pathname resolution flags. + */ +#ifndef _LINUX_NAMEI_H +#define _LINUX_NAMEI_H + +/* Pathname lookup flags */ +#define LOOKUP_FOLLOW 0x0001 /* Follow links at end */ +#define LOOKUP_DIRECTORY 0x0002 /* Require a directory */ +#define LOOKUP_AUTOMOUNT 0x0004 /* Force terminal automount */ +#define LOOKUP_EMPTY 0x0008 /* Accept empty path */ +#define LOOKUP_DOWN 0x0020 /* Follow mounts at start */ +#define LOOKUP_MOUNTPOINT 0x0040 /* Follow mounts at end */ +#define LOOKUP_REVAL 0x0080 /* Revalidate cache */ +#define LOOKUP_RCU 0x0100 /* RCU mode */ +#define LOOKUP_CACHED 0x0200 /* Cached lookup only */ +#define LOOKUP_PARENT 0x0400 /* Looking up parent */ +#define LOOKUP_OPEN 0x10000 /* Opening file */ +#define LOOKUP_CREATE 0x20000 /* Creating file */ +#define LOOKUP_EXCL 0x40000 /* Exclusive create */ +#define LOOKUP_RENAME_TARGET 0x80000 /* Rename target */ + +#endif /* _LINUX_NAMEI_H */