From 7e6454020ed1143e05e83a683606f318995458e5 Mon Sep 17 00:00:00 2001 From: Alex AUVOLAT Date: Fri, 18 May 2012 16:16:07 +0200 Subject: Can now spawn new processes. --- src/kernel/vfs/node.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/kernel/vfs') 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; } -- cgit v1.2.3