diff options
author | Alex AUVOLAT <alexis211@gmail.com> | 2012-05-18 16:16:07 +0200 |
---|---|---|
committer | Alex AUVOLAT <alexis211@gmail.com> | 2012-05-18 16:16:07 +0200 |
commit | 7e6454020ed1143e05e83a683606f318995458e5 (patch) | |
tree | 763ec6f5dda5f8f662f5eeb38f29d4279681b0a2 /src/kernel/vfs | |
parent | daa6c2450fa0646619698f0dc01b0456b2541317 (diff) | |
download | TCE-7e6454020ed1143e05e83a683606f318995458e5.tar.gz TCE-7e6454020ed1143e05e83a683606f318995458e5.zip |
Can now spawn new processes.
Diffstat (limited to 'src/kernel/vfs')
-rw-r--r-- | src/kernel/vfs/node.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/kernel/vfs/node.cpp b/src/kernel/vfs/node.cpp index 08c7817..ea7b531 100644 --- a/src/kernel/vfs/node.cpp +++ b/src/kernel/vfs/node.cpp @@ -25,8 +25,10 @@ void vfs_setup() { root->add_child(".ui", dot_ui); } -node* vfs_find(node* root, char* path) { +node* vfs_find(node* root, char* fn) { node* el = root; + char *path = strdup(fn); + char *s = path; char *member = path; while (*path != 0 && el != 0) { @@ -47,6 +49,7 @@ node* vfs_find(node* root, char* path) { if (el != 0 && member != path) { el = el->get_child(member); } + kfree(s); return el; } |