Added an Init() amd dealt with the PrettyName().

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3478 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2003-06-11 22:00:59 +00:00
parent 450c7dd609
commit 13a452eaee
4 changed files with 41 additions and 4 deletions
@@ -9,6 +9,7 @@
KDiskSystem::KDiskSystem(const char *name)
: fID(-1),
fName(NULL),
fPrettyName(NULL),
fLoadCounter(0)
{
}
@@ -19,6 +20,14 @@ KDiskSystem::~KDiskSystem()
free(fName);
}
// Init
status_t
KDiskSystem::Init()
{
// to be implemented by derived classes
return B_OK;
}
// SetID
void
KDiskSystem::SetID(disk_system_id id)
@@ -44,8 +53,7 @@ KDiskSystem::Name() const
const char *
KDiskSystem::PrettyName()
{
// to be implemented by derived classes
return NULL;
return fPrettyName;
}
// IsFileSystem
@@ -392,3 +400,10 @@ KDiskSystem::UnloadModule()
// to be implemented by derived classes
}
// SetPrettyName
status_t
KDiskSystem::SetPrettyName(const char *name)
{
return set_string(fPrettyName, name);
}
@@ -20,6 +20,21 @@ KPartitioningSystem::~KPartitioningSystem()
{
}
// Init
status_t
KPartitioningSystem::Init()
{
status_t error = KDiskSystem::Init();
if (error != B_OK)
return error;
error = Load();
if (error != B_OK)
return error;
error = SetPrettyName(fModule->pretty_name);
Unload();
return error;
}
// IsFileSystem
bool
KPartitioningSystem::IsFileSystem() const