From 5d88097b8d704f29a64ec5b41b5f28f8b24dd2ce Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sun, 3 May 2020 01:11:54 +0200 Subject: Began linked vfs with file indexing --- src/kernel/fs/ext2.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/kernel/fs/ext2.h') diff --git a/src/kernel/fs/ext2.h b/src/kernel/fs/ext2.h index f98531e..2fd0e83 100644 --- a/src/kernel/fs/ext2.h +++ b/src/kernel/fs/ext2.h @@ -58,7 +58,7 @@ struct bgd { } __attribute__((packed)); struct ext2_inode { - uint16_t type_and_permissions; + uint16_t mode; uint16_t uid; uint32_t size; @@ -93,6 +93,14 @@ struct ext2_inode { #define S_IFLNK 0xA000 #define S_IFSOCK 0xC000 +#define S_ISDIR(m) ((m & 0170000) == 0040000) +#define S_ISCHR(m) ((m & 0170000) == 0020000) +#define S_ISBLK(m) ((m & 0170000) == 0060000) +#define S_ISREG(m) ((m & 0170000) == 0100000) +#define S_ISFIFO(m) ((m & 0170000) == 0010000) +#define S_ISLNK(m) ((m & 0170000) == 0120000) +#define S_ISSOCK(m) ((m & 0170000) == 0140000) + #define S_ISUID 04000 #define S_ISGID 02000 #define S_ISTICK 01000 -- cgit v1.2.3