Rootfs now starts with 1 for the first inode ID.

Instead of -1, vnode_path_to_vnode() now returns the ID of the starting vnode when it
doesn't need to traverse the path at all.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14081 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2005-08-28 20:08:32 +00:00
parent d8b4450df0
commit 47a54bea53
2 changed files with 2 additions and 2 deletions

View File

@ -313,7 +313,7 @@ rootfs_mount(mount_id id, const char *device, uint32 flags, const char *args,
return B_NO_MEMORY;
fs->id = id;
fs->next_vnode_id = 0;
fs->next_vnode_id = 1;
err = mutex_init(&fs->lock, "rootfs_mutex");
if (err < B_OK)

View File

@ -1338,7 +1338,7 @@ vnode_path_to_vnode(struct vnode *vnode, char *path, bool traverseLeafLink,
int count, struct vnode **_vnode, vnode_id *_parentID, int *_type)
{
status_t status = 0;
vnode_id lastParentID = -1;
vnode_id lastParentID = vnode->id;
int type = 0;
FUNCTION(("vnode_path_to_vnode(vnode = %p, path = %s)\n", vnode, path));