aboutsummaryrefslogtreecommitdiff
path: root/include/ext_common.h
diff options
context:
space:
mode:
authorSean Anderson <seanga2@gmail.com>2023-10-14 16:47:50 -0400
committerTom Rini <trini@konsulko.com>2023-10-17 20:50:52 -0400
commit0bf3fec2798fc8872c5754811fa70dfa973841e9 (patch)
tree9187e2a2e0ce185df33706c20f85db2e352b4f01 /include/ext_common.h
parent44071cd5a8b1719397fe818d1c6ebc67a5db1953 (diff)
downloadu-boot-0bf3fec2798fc8872c5754811fa70dfa973841e9.zip
u-boot-0bf3fec2798fc8872c5754811fa70dfa973841e9.tar.gz
u-boot-0bf3fec2798fc8872c5754811fa70dfa973841e9.tar.bz2
fs: ext4: Add some defines for testing
Add various defines which are not necessary for reading/writing filesystems, but which are useful for creating them. These mostly come from Linux v6.5-rc2 (what I had checked out). Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/ext_common.h')
-rw-r--r--include/ext_common.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/ext_common.h b/include/ext_common.h
index 30a0c24..b09bbde 100644
--- a/include/ext_common.h
+++ b/include/ext_common.h
@@ -35,6 +35,16 @@ struct cmd_tbl;
#define EXT2_PATH_MAX 4096
/* Maximum nesting of symlinks, used to prevent a loop. */
#define EXT2_MAX_SYMLINKCNT 8
+/* Maximum file name length */
+#define EXT2_NAME_LEN 255
+
+/*
+ * Revision levels
+ */
+#define EXT2_GOOD_OLD_REV 0 /* The good old (original) format */
+#define EXT2_DYNAMIC_REV 1 /* V2 format w/ dynamic inode sizes */
+
+#define EXT2_GOOD_OLD_INODE_SIZE 128
/* Filetype used in directory entry. */
#define FILETYPE_UNKNOWN 0
@@ -48,6 +58,10 @@ struct cmd_tbl;
#define FILETYPE_INO_DIRECTORY 0040000
#define FILETYPE_INO_SYMLINK 0120000
#define EXT2_ROOT_INO 2 /* Root inode */
+#define EXT2_BOOT_LOADER_INO 5 /* Boot loader inode */
+
+/* First non-reserved inode for old ext2 filesystems */
+#define EXT2_GOOD_OLD_FIRST_INO 11
/* The size of an ext2 block in bytes. */
#define EXT2_BLOCK_SIZE(data) (1 << LOG2_BLOCK_SIZE(data))