From 24175ce2a37d6f5d9ba367f942fabce681ee9e4a Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Fri, 24 Apr 2020 20:44:36 +0200 Subject: Removed vfs again... --- src/kernel/fs/vfs.c | 48 ------------------------------------------------ 1 file changed, 48 deletions(-) delete mode 100644 src/kernel/fs/vfs.c (limited to 'src/kernel/fs/vfs.c') diff --git a/src/kernel/fs/vfs.c b/src/kernel/fs/vfs.c deleted file mode 100644 index 6471f1b..0000000 --- a/src/kernel/fs/vfs.c +++ /dev/null @@ -1,48 +0,0 @@ -#include -#include - -struct fs_node *fs_root = NULL; - -uint32_t read_fs_node(struct fs_node *node, size_t offset, size_t size, char *buf) -{ - if (node->read != NULL) - return node->read(node, offset, size, buf); - else - return 0; -} - -uint32_t write_fs_node(struct fs_node *node, size_t offset, size_t size, char *buf) -{ - if (node->write != NULL) - return node->write(node, offset, size, buf); - else - return 0; -} - -void open_fs_node(struct fs_node *node, bool read, bool write) -{ - if (node->open != NULL) - node->open(node); -} - -void close_fs_node(struct fs_node *node) -{ - if (node->close != NULL) - node->close(node); -} - -struct dir_entry *read_dir_node(struct fs_node *node, size_t index) -{ - if ((node->type & DIR_NODE) != 0 && node->read_dir != NULL) - return node->read_dir(node, index); - else - return NULL; -} - -struct fs_node *find_dir_node(struct fs_node *node, char *name) -{ - if ((node->type & DIR_NODE) != 0 && node->find_dir != NULL) - return node->find_dir(node, name); - else - return NULL; -} \ No newline at end of file -- cgit v1.2.3