summaryrefslogtreecommitdiff
path: root/src/kernel/vfs/node.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/vfs/node.h')
-rw-r--r--src/kernel/vfs/node.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/kernel/vfs/node.h b/src/kernel/vfs/node.h
index 2d16dab..9005d55 100644
--- a/src/kernel/vfs/node.h
+++ b/src/kernel/vfs/node.h
@@ -6,6 +6,8 @@
#include <task/task.h>
+class display;
+
class node {
public:
node* parent;
@@ -13,6 +15,7 @@ class node {
int mode, uid, gid;
node(node* p, int t) : parent(p), type(t) {}
+ virtual ~node() {}
virtual int open(process *proc, int mode);
virtual void close(process *proc) {}
@@ -22,11 +25,16 @@ class node {
virtual node* get_child(char* name) { return 0; }
virtual int add_child(char* name, node *child) { return E_NOT_IMPLEMENTED; }
virtual size_t get_size() { return 0; }
+
+ // kind of like dynamic_cast'int these things
+ virtual display *as_display() { return 0; }
};
void vfs_setup();
node* vfs_find(node* root, char* filename);
+extern node *root, *dot_dev, *dot_ui;
+
// syscall interface
FILE open(char* filename, int mode);
FILE open_relative(FILE root, char* filename, int mode);