diff options
author | Marvin Borner | 2020-05-03 01:11:54 +0200 |
---|---|---|
committer | Marvin Borner | 2020-05-03 01:11:54 +0200 |
commit | 5d88097b8d704f29a64ec5b41b5f28f8b24dd2ce (patch) | |
tree | d018dd16ee38de9b710072d01ac1ebc6494be3b1 /src/kernel/fs/ext2.h | |
parent | e8f1c287a63f0f71fe463f7271834538b45f8c05 (diff) |
Began linked vfs with file indexing
Diffstat (limited to 'src/kernel/fs/ext2.h')
-rw-r--r-- | src/kernel/fs/ext2.h | 10 |
1 files changed, 9 insertions, 1 deletions
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 |