aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/fs/vfs.h
diff options
context:
space:
mode:
authorMarvin Borner2020-04-24 20:44:36 +0200
committerMarvin Borner2020-04-24 20:44:36 +0200
commit24175ce2a37d6f5d9ba367f942fabce681ee9e4a (patch)
tree829c4f13f8283298207b86b6a339763a10d3c521 /src/kernel/fs/vfs.h
parentcd1d0115f0b873e155a2435f932f3f2865d72ce9 (diff)
Removed vfs again...
Diffstat (limited to 'src/kernel/fs/vfs.h')
-rw-r--r--src/kernel/fs/vfs.h66
1 files changed, 0 insertions, 66 deletions
diff --git a/src/kernel/fs/vfs.h b/src/kernel/fs/vfs.h
deleted file mode 100644
index 3582a11..0000000
--- a/src/kernel/fs/vfs.h
+++ /dev/null
@@ -1,66 +0,0 @@
-#ifndef MELVIX_VFS_H
-#define MELVIX_VFS_H
-
-#include <stdbool.h>
-#include <stddef.h>
-#include <stdint.h>
-
-#define MAX_NAME_LENGTH 128
-
-enum node_type {
- FILE_NODE = 1,
- DIR_NODE,
- CHAR_DEV_NODE,
- BLOCK_DEV_NODE,
- PIPE_NODE,
- SYMLINK_NODE,
- MOUNTPOINT_NODE = 8
-};
-
-struct fs_node;
-struct dir_entry;
-
-typedef uint32_t (*read)(struct fs_node *, size_t, size_t, char *);
-typedef uint32_t (*write)(struct fs_node *, size_t, size_t, char *);
-typedef void (*open)(struct fs_node *);
-typedef void (*close)(struct fs_node *);
-
-typedef struct dir_entry *(*read_dir)(struct fs_node *, size_t);
-typedef struct fs_node *(*find_dir)(struct fs_node *, char *);
-
-struct fs_node {
- char name[MAX_NAME_LENGTH];
- uint32_t length;
- uint32_t inode;
- uint32_t permissions;
- uint32_t uid;
- uint32_t gid;
- enum node_type type;
-
- struct fs_node *node_ptr;
-
- void *impl;
-
- read read;
- write write;
- open open;
- close close;
- read_dir read_dir;
- find_dir find_dir;
-};
-
-struct dir_entry {
- char name[MAX_NAME_LENGTH];
- uint32_t inode;
-};
-
-struct fs_node *fs_root;
-
-uint32_t read_fs_node(struct fs_node *node, size_t offset, size_t size, char *buf);
-uint32_t write_fs_node(struct fs_node *node, size_t offset, size_t size, char *buf);
-void open_fs_node(struct fs_node *node, bool read, bool write);
-void close_fs_node(struct fs_node *node);
-struct dir_entry *read_dir_node(struct fs_node *node, size_t index);
-struct fs_node *find_dir_node(struct fs_node *node, char *name);
-
-#endif \ No newline at end of file