Got the kernel interface compiling.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29333 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2009-02-27 11:38:26 +00:00
parent b19b5f9dda
commit 3594d63b34
3 changed files with 18 additions and 7 deletions

View File

@ -11,6 +11,8 @@
#include "Debug.h"
#include "haiku_fs_cache.h"
#include "HaikuKernelNode.h"
#include "HaikuKernelVolume.h"
#include "kernel_emu.h"
@ -145,8 +147,8 @@ publish_vnode(fs_volume *_volume, ino_t vnodeID, void *privateNode,
return error;
// publish the new node
error = UserlandFS::KernelEmu::publish_vnode(volume, vnodeID, node, type,
flags);
error = UserlandFS::KernelEmu::publish_vnode(volume->GetID(), vnodeID, node,
type, flags);
if (error != B_OK)
volume->UndoPublishVNode(node);
@ -155,18 +157,18 @@ publish_vnode(fs_volume *_volume, ino_t vnodeID, void *privateNode,
// get_vnode
status_t
get_vnode(defs_volume *_volume, ino_t vnodeID, fs_vnode *privateNode)
get_vnode(fs_volume *_volume, ino_t vnodeID, fs_vnode *privateNode)
{
HaikuKernelVolume* volume = HaikuKernelVolume::GetVolume(_volume);
// get the node
void* foundNode;
status_t error = UserlandFS::KernelEmu::get_vnode(volume, vnodeID,
status_t error = UserlandFS::KernelEmu::get_vnode(volume->GetID(), vnodeID,
&foundNode);
if (error != B_OK)
return error;
((HaikuKernelNode*)foundNode)->GetFSNode(privateNode);
*privateNode = *(HaikuKernelNode*)foundNode;
return B_OK;
}
@ -221,7 +223,7 @@ get_vnode_removed(fs_volume *_volume, ino_t vnodeID, bool* removed)
fs_volume*
volume_for_vnode(fs_vnode *vnode)
{
return HaikuKernelNode::GetNode(vnode)->GetVolume();
return HaikuKernelNode::GetNode(vnode)->GetVolume()->GetFSVolume();
}
@ -520,7 +522,7 @@ remove_debugger_command(char *name, debugger_command_hook hook)
}
// parse_expression
uint32
uint64
parse_expression(const char *string)
{
return UserlandFS::KernelEmu::parse_expression(string);

View File

@ -324,6 +324,14 @@ UserlandFS::KernelEmu::put_vnode(dev_t nsid, ino_t vnid)
return error;
}
// acquire_vnode
status_t
UserlandFS::KernelEmu::acquire_vnode(dev_t nsid, ino_t vnodeID)
{
// TODO: Implement!
return B_BAD_VALUE;
}
// new_vnode
status_t
UserlandFS::KernelEmu::new_vnode(dev_t nsid, ino_t vnid, void* data)

View File

@ -22,6 +22,7 @@ status_t notify_query(port_id port, int32 token, int32 operation,
status_t get_vnode(dev_t nsid, ino_t vnid, void** node);
status_t put_vnode(dev_t nsid, ino_t vnid);
status_t acquire_vnode(dev_t nsid, ino_t vnodeID);
status_t new_vnode(dev_t nsid, ino_t vnid, void* data);
status_t publish_vnode(dev_t nsid, ino_t vnid, void* data, int type,
uint32 flags);