Since there currently are no directory traversing functions, I've

added a temporary get_node_from() function which returns the Node
assigned to the file descriptor.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5047 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2003-10-16 18:00:28 +00:00
parent af0e9e9d12
commit 8fbf1c6169
+18
View File
@@ -45,6 +45,8 @@ class Descriptor {
status_t Acquire();
status_t Release();
Node *GetNode() const { return fNode; }
private:
Node *fNode;
void *fCookie;
@@ -588,6 +590,22 @@ open_from(Directory *directory, const char *name, int mode)
}
/** Since we don't have directory functions yet, this
* function is needed to get the contents of a directory.
* It should be removed once readdir() & co. are in place.
*/
Node *
get_node_from(int fd)
{
Descriptor *descriptor = get_descriptor(fd);
if (descriptor == NULL)
return NULL;
return descriptor->GetNode();
}
int
close(int fd)
{