[Concept,28/34] ext4l: Move DT_* directory entry types to linux/fs.h

Message ID 20260114225635.3407989-29-sjg@u-boot.org
State New
Headers
Series ext4l: Clean up ext4_uboot.h by moving definitions to standard headers |

Commit Message

Simon Glass Jan. 14, 2026, 10:56 p.m. UTC
  From: Simon Glass <simon.glass@canonical.com>

Move the DT_* directory entry type constants from ext4_uboot.h to
linux/fs.h where they belong alongside struct dir_context and other
directory-related definitions.

This includes: DT_UNKNOWN, DT_FIFO, DT_CHR, DT_DIR, DT_BLK, DT_REG,
DT_LNK, DT_SOCK and DT_WHT

Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
---

 fs/ext4l/ext4_uboot.h | 11 +----------
 include/linux/fs.h    | 11 +++++++++++
 2 files changed, 12 insertions(+), 10 deletions(-)
  

Patch

diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h
index 68acbd489f4..cc0cb48fc24 100644
--- a/fs/ext4l/ext4_uboot.h
+++ b/fs/ext4l/ext4_uboot.h
@@ -513,16 +513,7 @@  typedef long long qsize_t;
 
 /* bh_end_io_t and struct buffer_head are in linux/buffer_head.h */
 
-/* Directory entry types */
-#define DT_UNKNOWN	0
-#define DT_FIFO		1
-#define DT_CHR		2
-#define DT_DIR		4
-#define DT_BLK		6
-#define DT_REG		8
-#define DT_LNK		10
-#define DT_SOCK		12
-#define DT_WHT		14
+/* DT_* directory entry types are in linux/fs.h */
 
 /* mnt_idmap - stub */
 struct mnt_idmap {
diff --git a/include/linux/fs.h b/include/linux/fs.h
index af9cf21692b..7963e931fad 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -173,6 +173,17 @@  static inline void inode_init_once(struct inode *inode)
 /* S_ISDIR, etc. - already in linux/stat.h */
 #include <linux/stat.h>
 
+/* Directory entry types */
+#define DT_UNKNOWN	0
+#define DT_FIFO		1
+#define DT_CHR		2
+#define DT_DIR		4
+#define DT_BLK		6
+#define DT_REG		8
+#define DT_LNK		10
+#define DT_SOCK		12
+#define DT_WHT		14
+
 /* Directory context for readdir iteration */
 struct dir_context;
 typedef int (*filldir_t)(struct dir_context *, const char *, int, loff_t,