Some renaming.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20207 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
e0f723a9e1
commit
b9a1530f6d
@ -280,7 +280,7 @@ Directory::FindAndGetNode(const char *name, Node **node, Entry **_entry) const
|
||||
*node = entry->GetNode();
|
||||
if (_entry)
|
||||
*_entry = entry;
|
||||
error = GetVolume()->GetNode(*node);
|
||||
error = GetVolume()->GetVNode(*node);
|
||||
}
|
||||
return error;
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ status_t
|
||||
Node::AddReference()
|
||||
{
|
||||
if (++fRefCount == 1) {
|
||||
status_t error = GetVolume()->NewNode(this);
|
||||
status_t error = GetVolume()->NewVNode(this);
|
||||
if (error != B_OK) {
|
||||
fRefCount--;
|
||||
return error;
|
||||
@ -102,7 +102,7 @@ void
|
||||
Node::RemoveReference()
|
||||
{
|
||||
if (--fRefCount == 0) {
|
||||
GetVolume()->RemoveNode(this);
|
||||
GetVolume()->RemoveVNode(this);
|
||||
fRefCount++;
|
||||
}
|
||||
}
|
||||
|
@ -338,9 +338,9 @@ Volume::GetName() const
|
||||
return fName.GetString();
|
||||
}
|
||||
|
||||
// NewNode
|
||||
// NewVNode
|
||||
status_t
|
||||
Volume::NewNode(Node *node)
|
||||
Volume::NewVNode(Node *node)
|
||||
{
|
||||
status_t error = NodeAdded(node);
|
||||
if (error == B_OK) {
|
||||
@ -351,45 +351,45 @@ Volume::NewNode(Node *node)
|
||||
return error;
|
||||
}
|
||||
|
||||
// GetNode
|
||||
// GetVNode
|
||||
status_t
|
||||
Volume::GetNode(vnode_id id, Node **node)
|
||||
Volume::GetVNode(vnode_id id, Node **node)
|
||||
{
|
||||
return (fMounted ? get_vnode(GetID(), id, (void**)node) : B_BAD_VALUE);
|
||||
}
|
||||
|
||||
// GetNode
|
||||
// GetVNode
|
||||
status_t
|
||||
Volume::GetNode(Node *node)
|
||||
Volume::GetVNode(Node *node)
|
||||
{
|
||||
Node *dummy = NULL;
|
||||
status_t error = (fMounted ? GetNode(node->GetID(), &dummy)
|
||||
status_t error = (fMounted ? GetVNode(node->GetID(), &dummy)
|
||||
: B_BAD_VALUE );
|
||||
if (error == B_OK && dummy != node) {
|
||||
FATAL(("Two Nodes have the same ID: %Ld!\n", node->GetID()));
|
||||
PutNode(dummy);
|
||||
PutVNode(dummy);
|
||||
error = B_ERROR;
|
||||
}
|
||||
return error;
|
||||
}
|
||||
|
||||
// PutNode
|
||||
// PutVNode
|
||||
status_t
|
||||
Volume::PutNode(vnode_id id)
|
||||
Volume::PutVNode(vnode_id id)
|
||||
{
|
||||
return (fMounted ? put_vnode(GetID(), id) : B_BAD_VALUE);
|
||||
}
|
||||
|
||||
// PutNode
|
||||
// PutVNode
|
||||
status_t
|
||||
Volume::PutNode(Node *node)
|
||||
Volume::PutVNode(Node *node)
|
||||
{
|
||||
return (fMounted ? put_vnode(GetID(), node->GetID()) : B_BAD_VALUE);
|
||||
}
|
||||
|
||||
// RemoveNode
|
||||
// RemoveVNode
|
||||
status_t
|
||||
Volume::RemoveNode(Node *node)
|
||||
Volume::RemoveVNode(Node *node)
|
||||
{
|
||||
if (fMounted)
|
||||
return remove_vnode(GetID(), node->GetID());
|
||||
@ -399,9 +399,9 @@ Volume::RemoveNode(Node *node)
|
||||
return error;
|
||||
}
|
||||
|
||||
// UnremoveNode
|
||||
// UnremoveVNode
|
||||
status_t
|
||||
Volume::UnremoveNode(Node *node)
|
||||
Volume::UnremoveVNode(Node *node)
|
||||
{
|
||||
return (fMounted ? unremove_vnode(GetID(), node->GetID()) : B_BAD_VALUE);
|
||||
}
|
||||
|
@ -107,14 +107,13 @@ public:
|
||||
|
||||
Directory *GetRootDirectory() const { return fRootDirectory; }
|
||||
|
||||
// TODO: Rename these to *VNode()?
|
||||
status_t NewNode(Node *node);
|
||||
status_t GetNode(vnode_id id, Node **node);
|
||||
status_t GetNode(Node *node);
|
||||
status_t PutNode(vnode_id id);
|
||||
status_t PutNode(Node *node);
|
||||
status_t RemoveNode(Node *node);
|
||||
status_t UnremoveNode(Node *node);
|
||||
status_t NewVNode(Node *node);
|
||||
status_t GetVNode(vnode_id id, Node **node);
|
||||
status_t GetVNode(Node *node);
|
||||
status_t PutVNode(vnode_id id);
|
||||
status_t PutVNode(Node *node);
|
||||
status_t RemoveVNode(Node *node);
|
||||
status_t UnremoveVNode(Node *node);
|
||||
|
||||
// node table and listeners
|
||||
status_t NodeAdded(Node *node);
|
||||
|
@ -407,11 +407,11 @@ FUNCTION(("dir: (%Lu), entry: `%s'\n", (dir ? dir->GetID() : -1), entryName));
|
||||
// special entries: "." and ".."
|
||||
} else if (!strcmp(entryName, ".")) {
|
||||
*vnid = dir->GetID();
|
||||
if (volume->GetNode(*vnid, &node) != B_OK)
|
||||
if (volume->GetVNode(*vnid, &node) != B_OK)
|
||||
error = B_BAD_VALUE;
|
||||
} else if (!strcmp(entryName, "..")) {
|
||||
Directory *parent = dir->GetParent();
|
||||
if (parent && volume->GetNode(parent->GetID(), &node) == B_OK)
|
||||
if (parent && volume->GetVNode(parent->GetID(), &node) == B_OK)
|
||||
*vnid = node->GetID();
|
||||
else
|
||||
error = B_BAD_VALUE;
|
||||
@ -428,7 +428,7 @@ SET_ERROR(error, error);
|
||||
*resolvedPath = strdup(symLink->GetLinkedPath());
|
||||
if (!*resolvedPath)
|
||||
SET_ERROR(error, B_NO_MEMORY);
|
||||
volume->PutNode(*vnid);
|
||||
volume->PutVNode(*vnid);
|
||||
}
|
||||
}
|
||||
} else
|
||||
@ -654,7 +654,7 @@ ramfs_create(void *ns, void *_dir, const char *name, int openMode,
|
||||
// get vnode
|
||||
if (error == B_OK) {
|
||||
*vnid = node->GetID();
|
||||
error = volume->GetNode(node->GetID(), &node);
|
||||
error = volume->GetVNode(node->GetID(), &node);
|
||||
}
|
||||
}
|
||||
// the user must have dir write permission to create a new entry
|
||||
@ -974,9 +974,9 @@ oldDir->GetID(), oldName, newDir->GetID(), newName));
|
||||
|
||||
// release the entries
|
||||
if (clobberEntry)
|
||||
volume->PutNode(clobberNode);
|
||||
volume->PutVNode(clobberNode);
|
||||
if (entry)
|
||||
volume->PutNode(node);
|
||||
volume->PutVNode(node);
|
||||
}
|
||||
|
||||
// notify listeners
|
||||
@ -1062,7 +1062,7 @@ ramfs_unlink(void *ns, void *_dir, const char *name)
|
||||
SET_ERROR(error, B_DIRECTORY_NOT_EMPTY);
|
||||
} else
|
||||
error = dir->DeleteEntry(entry);
|
||||
volume->PutNode(node);
|
||||
volume->PutVNode(node);
|
||||
} else
|
||||
SET_ERROR(error, B_ENTRY_NOT_FOUND);
|
||||
}
|
||||
@ -1108,7 +1108,7 @@ ramfs_rmdir(void *ns, void *_dir, const char *name)
|
||||
SET_ERROR(error, B_DIRECTORY_NOT_EMPTY);
|
||||
} else
|
||||
error = dir->DeleteEntry(entry);
|
||||
volume->PutNode(node);
|
||||
volume->PutVNode(node);
|
||||
} else
|
||||
SET_ERROR(error, B_ENTRY_NOT_FOUND);
|
||||
}
|
||||
@ -1237,7 +1237,7 @@ ramfs_mkdir(void *ns, void *_dir, const char *name, int mode)
|
||||
node->SetUID(geteuid());
|
||||
node->SetGID(getegid());
|
||||
// put the node
|
||||
volume->PutNode(node->GetID());
|
||||
volume->PutVNode(node->GetID());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1460,7 +1460,7 @@ ramfs_symlink(void *ns, void *_dir, const char *name, const char *path)
|
||||
node->SetUID(geteuid());
|
||||
node->SetGID(getegid());
|
||||
// put the node
|
||||
volume->PutNode(node->GetID());
|
||||
volume->PutVNode(node->GetID());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user