From 39100c30b7a16103e75187c9840a79c7df54f3da Mon Sep 17 00:00:00 2001 From: Miguel Date: Mon, 20 Aug 2018 00:47:53 +0200 Subject: schicophrenic cleanup after realizing many fundamental desgin problems! --- fs/ext2.h | 1 + fs/foolfs.h | 0 fs/fs.c | 2 -- fs/fs.h | 2 +- fs/mount.c | 2 +- fs/mount.h | 8 +++----- 6 files changed, 6 insertions(+), 9 deletions(-) delete mode 100644 fs/foolfs.h (limited to 'fs') diff --git a/fs/ext2.h b/fs/ext2.h index 07f4153..066a769 100644 --- a/fs/ext2.h +++ b/fs/ext2.h @@ -1,5 +1,6 @@ #include #include "fs.h" + int ext2_check(uint8_t *ram); int ext2_inode_content(char *ram,int inode_nr,uint8_t *ramdest,int max); int ext2_read_dir(uint8_t *ram, int inode_nr,fs_dirent *dirs,int max); diff --git a/fs/foolfs.h b/fs/foolfs.h deleted file mode 100644 index e69de29..0000000 diff --git a/fs/fs.c b/fs/fs.c index 0810735..74ed010 100644 --- a/fs/fs.c +++ b/fs/fs.c @@ -29,11 +29,9 @@ void fs_mount(multiboot_information *info) { log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"mounting mod from 0x%08X-0x%08X : %s", mod->mod_start,mod->mod_end, mod->string); - //pmmngr_deinit_region(mod->mod_start,((uint32_t)mod->mod_end-(uint32_t)mod->mod_start)+1); root_ext2_ramimage=mod->mod_start; - mod++; } diff --git a/fs/fs.h b/fs/fs.h index b90b4f1..aa38180 100644 --- a/fs/fs.h +++ b/fs/fs.h @@ -19,7 +19,7 @@ typedef struct fs_dirent_struct char name[256]; }fs_dirent; -int fs_readdir(const char *name,fs_dirent *dirs,int max); +int fs_readdir(const char *name,fs_dirent *dirs,int max); void fs_mount(multiboot_information *info); // mounts ext2 ramimage from module as root #endif diff --git a/fs/mount.c b/fs/mount.c index 616262d..cb741f9 100644 --- a/fs/mount.c +++ b/fs/mount.c @@ -1,7 +1,7 @@ #include "mount.h" void mount_add(char *path, void *data, - file (*open)(struct mount_struct*,char *path), + file (*open) (struct mount_struct*,char *path), int (*getdents)(struct mount_struct*, uint32_t file_desciptor, fs_dirent *entries, uint32_t max_count)) { } diff --git a/fs/mount.h b/fs/mount.h index 372e051..0a330a6 100644 --- a/fs/mount.h +++ b/fs/mount.h @@ -9,9 +9,9 @@ typedef struct mount_struct { - char path[256]; // where are we mounted - int (*getdents)(struct mount_struct*, uint32_t file_desciptor, fs_dirent *entries, uint32_t max_count); - file (*open)(struct mount_struct*,char *path); + char path[256]; // where are we mounted + int (*getdents) (struct mount_struct*, uint32_t file_desciptor, fs_dirent *entries, uint32_t max_count); + file (*open) (struct mount_struct*,char *path); void *data //opaque }mount; @@ -19,7 +19,5 @@ typedef struct mount_struct mount *mounts_get(); void mount_add(char *path, void *data,file (*open)(struct mount_struct*,char *path),int (*getdents)(struct mount_struct*, uint32_t file_desciptor, fs_dirent *entries, uint32_t max_count)); - - // #endif -- cgit v1.2.3