[wip] improve mkfs, add CWD

This commit is contained in:
2025-04-24 21:40:16 +03:00
parent 3f605489ac
commit a6d8c9e40e
4 changed files with 287 additions and 19 deletions

View File

@@ -14,6 +14,7 @@ struct fs_header {
unsigned int inode_ptrs[(FS_BLOCK_SIZE-sizeof(int)*3) / sizeof(int)];
};
__attribute__((packed))
struct fs_header_extension {
unsigned int next_extension;
unsigned int inode_ptrs[(FS_BLOCK_SIZE-sizeof(int)) / sizeof(int)];
@@ -28,11 +29,20 @@ struct fs_inode {
unsigned int blocks[(FS_BLOCK_SIZE-sizeof(int)*3) / sizeof(int)];
};
__attribute__((packed))
struct fs_inode_extension {
unsigned int next_extension;
unsigned int blocks[(FS_BLOCK_SIZE-sizeof(int)) / sizeof(int)];
};
__attribute__((packed))
struct fs_directory_block_data {
unsigned char fname[60];
unsigned int inode_no;
};
char *fs_get_cwd(void);
int fs_create(void *d);
int fs_use(void *d);
int fs_mkfs(void *d);