ext2: extend inode block searching

This commit is contained in:
Michael Shaw 2023-10-19 22:52:35 -04:00
commit 4c040f280f
4 changed files with 129 additions and 23 deletions

View file

@ -138,6 +138,8 @@ struct ext2fs {
struct ext2_group_desc *bgdt;
uint32_t indir_block_size;
uint32_t block_size;
};

View file

@ -35,6 +35,14 @@ struct inode {
uint32_t faddr;
} PACKED; /* PACKED to allow for memcpy */
struct dirent {
uint64_t inode;
uint64_t offset;
uint16_t reclen;
uint8_t type;
char name[256];
};
struct file {
struct inode inode;
@ -49,9 +57,10 @@ struct file {
struct file_descriptor {
struct file file;
uint64_t pos;
uint64_t pos;
int fd;
uint32_t flags;
uint32_t mode;
struct fs *fs;
};