Merged the disk device manager module interface for file systems with the

VFS's interface, so that a file system only has to implement one interface.
As a side effect, the automatic file system detection may now work (not yet
tested, though).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12786 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2005-05-23 17:15:56 +00:00
parent 87ab5d5c6d
commit 47f39c93cb
15 changed files with 183 additions and 263 deletions
@@ -4,15 +4,18 @@
#include <stdlib.h>
#include <unistd.h>
#include <fs_interface.h>
#include "ddm_modules.h"
#include "KDiskDeviceUtils.h"
#include "KFileSystem.h"
#include "KPartition.h"
// constructor
KFileSystem::KFileSystem(const char *name)
: KDiskSystem(name),
fModule(NULL)
fModule(NULL)
{
}
@@ -32,7 +35,7 @@ KFileSystem::Init()
if (error != B_OK)
return error;
error = SetPrettyName(fModule->pretty_name);
SetFlags(fModule->flags | B_DISK_SYSTEM_IS_FILE_SYSTEM);
SetFlags(/*fModule->flags |*/ B_DISK_SYSTEM_IS_FILE_SYSTEM);
Unload();
return error;
}
@@ -291,31 +294,32 @@ KFileSystem::SetContentName(KPartition *partition, char *name,
return B_ERROR;
}
// SetContentParameters
status_t
KFileSystem::SetContentParameters(KPartition *partition,
const char *parameters, KDiskDeviceJob *job)
const char *parameters, KDiskDeviceJob *job)
{
// to be implemented
return B_ERROR;
}
// Initialize
status_t
KFileSystem::Initialize(KPartition *partition, const char *name,
const char *parameters, KDiskDeviceJob *job)
const char *parameters, KDiskDeviceJob *job)
{
// to be implemented
return B_ERROR;
}
// LoadModule
status_t
KFileSystem::LoadModule()
{
if (fModule) // shouldn't happen
return B_OK;
return get_module(Name(), (module_info**)&fModule);
return get_module(Name(), (module_info **)&fModule);
}
// UnloadModule
@@ -323,7 +327,7 @@ void
KFileSystem::UnloadModule()
{
if (fModule) {
put_module(fModule->module.name);
put_module(fModule->info.name);
fModule = NULL;
}
}