ramfs: Fix setting the ops and an incorrect node cast.
And now ramfs works!
This commit is contained in:
@@ -105,6 +105,7 @@ ramfs_mount(fs_volume* _volume, const char* /*device*/, uint32 flags,
|
||||
|
||||
*_rootID = volume->GetRootDirectory()->GetID();
|
||||
_volume->private_volume = volume;
|
||||
_volume->ops = &gRamFSVolumeOps;
|
||||
|
||||
RETURN_ERROR(B_OK);
|
||||
}
|
||||
@@ -186,7 +187,7 @@ ramfs_lookup(fs_volume* _volume, fs_vnode* _dir, const char* entryName,
|
||||
{
|
||||
// FUNCTION_START();
|
||||
Volume* volume = (Volume*)_volume->private_volume;
|
||||
Directory* dir = dynamic_cast<Directory*>((Node*)_dir);
|
||||
Directory* dir = dynamic_cast<Directory*>((Node*)_dir->private_node);
|
||||
|
||||
FUNCTION(("dir: (%llu), entry: `%s'\n", (dir ? dir->GetID() : -1),
|
||||
entryName));
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <SupportDefs.h>
|
||||
|
||||
extern struct fs_vnode_ops gRamFSVnodeOps;
|
||||
extern struct fs_volume_ops gRamFSVolumeOps;
|
||||
const size_t kMaxIndexKeyLength = 256;
|
||||
|
||||
#endif // RAM_FS_H
|
||||
|
||||
Reference in New Issue
Block a user