Fixed a possible bug in path_to_vnode(): if called before a root
file system has been mounted, it would have crashed (that for example happened if you deleted the kernel settings file...). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12547 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
9c3942070a
commit
47729f044c
|
@ -1449,6 +1449,11 @@ path_to_vnode(char *path, bool traverseLink, struct vnode **_vnode, bool kernel)
|
|||
|
||||
// figure out if we need to start at root or at cwd
|
||||
if (*path == '/') {
|
||||
if (sRoot == NULL) {
|
||||
// we're a bit early, aren't we?
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
while (*++path == '/')
|
||||
;
|
||||
start = sRoot;
|
||||
|
|
Loading…
Reference in New Issue