summaryrefslogtreecommitdiff
path: root/src/kernel/vfs/node.cpp
diff options
context:
space:
mode:
authorAlex AUVOLAT <alexis211@gmail.com>2012-05-18 13:09:28 +0200
committerAlex AUVOLAT <alexis211@gmail.com>2012-05-18 13:09:28 +0200
commitf56aa2f7e4b8e6430e123f714507032a33955a09 (patch)
tree0381e4cbff6e5e856a3218d811da22fa12c97fcf /src/kernel/vfs/node.cpp
parentf3e03796652b792bb3fd5d3d25b687b9a7f14633 (diff)
downloadTCE-f56aa2f7e4b8e6430e123f714507032a33955a09.tar.gz
TCE-f56aa2f7e4b8e6430e123f714507032a33955a09.zip
The keyboard handling, it's getting better. + Funny screenshot.
Diffstat (limited to 'src/kernel/vfs/node.cpp')
-rw-r--r--src/kernel/vfs/node.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/kernel/vfs/node.cpp b/src/kernel/vfs/node.cpp
index e174bd6..08c7817 100644
--- a/src/kernel/vfs/node.cpp
+++ b/src/kernel/vfs/node.cpp
@@ -2,7 +2,6 @@
#include "vdir.h"
int node::open(process *proc, int mode) {
- //TODO : permission checks
return 0; // ok
}
@@ -62,6 +61,7 @@ static FILE i_open(node* r, char* filename, int mode) {
node* f = vfs_find(r, filename);
if (f == 0) return E_NOT_FOUND;
//TODO : different actions depending on open mode
+ //TODO : permission checks
int e = f->open(current_process, mode);
if (e != 0) return e;
return current_process->fd.add(f);
@@ -118,5 +118,8 @@ int write(FILE file, size_t offset, size_t len, char* buffer) {
}
int link(char* from, char* to, int mode) {
- return E_NOT_IMPLEMENTED;
+ node *f1 = vfs_find(root, from);
+ if (f1 == 0) return E_NOT_FOUND;
+ node *f2 = (to == 0 ? 0 : vfs_find(root, to));
+ return f1->link(f2, mode);
}