git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'interrupt-rework' into prog-loader
[lunaix-os.git]
/
lunaix-os
/
kernel
/
fs
/
path_walk.c
diff --git
a/lunaix-os/kernel/fs/path_walk.c
b/lunaix-os/kernel/fs/path_walk.c
index ea5b1c59b4aa5da7e54d59d467d8875025ac632c..cd0ac01565e4616ca68901a8ccaa7ed2938b244b 100644
(file)
--- a/
lunaix-os/kernel/fs/path_walk.c
+++ b/
lunaix-os/kernel/fs/path_walk.c
@@
-1,5
+1,6
@@
#include <lunaix/fs.h>
#include <lunaix/mm/valloc.h>
#include <lunaix/fs.h>
#include <lunaix/mm/valloc.h>
+#include <lunaix/process.h>
#include <lunaix/spike.h>
#include <klibc/string.h>
#include <lunaix/spike.h>
#include <klibc/string.h>
@@
-33,7
+34,10
@@
__vfs_walk(struct v_dnode* start,
panick("vfs: no root");
}
}
panick("vfs: no root");
}
}
- i++;
+
+ if (path[0] == VFS_PATH_DELIM) {
+ i++;
+ }
}
assert(start);
}
assert(start);
@@
-71,9
+75,7
@@
__vfs_walk(struct v_dnode* start,
if (!lookahead && (walk_options & VFS_WALK_PARENT)) {
if (component) {
if (!lookahead && (walk_options & VFS_WALK_PARENT)) {
if (component) {
- component->hash = name.hash;
- component->len = j;
- strcpy(component->value, fname_buffer);
+ hstrcpy(component, &name);
}
break;
}
}
break;
}
@@
-105,7
+107,7
@@
__vfs_walk(struct v_dnode* start,
}
// reposition the resolved subtree pointed by symlink
}
// reposition the resolved subtree pointed by symlink
- vfs_dcache_rehash(current_level->parent, dnode);
+
//
vfs_dcache_rehash(current_level->parent, dnode);
current_level = dnode;
current_inode = dnode->inode;
}
current_level = dnode;
current_inode = dnode->inode;
}