Added BPartition::Uninitialize(). No CanUninitialize(), but

uninitialization does not affect the physical partition, anyway. The
system simply marks the partition as uninitialized for the current
session -- after rebooting it re-appears unchanged.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4777 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2003-09-21 19:13:29 +00:00
parent 5c699c6735
commit 4c4e5505b0
2 changed files with 14 additions and 0 deletions

View File

@ -118,6 +118,7 @@ public:
const char *parameters);
status_t Initialize(const char *diskSystem, const char *name,
const char *parameters);
status_t Uninitialize();
// Modification of child partitions

View File

@ -823,6 +823,19 @@ BPartition::Initialize(const char *diskSystem, const char *name,
return error;
}
// Uninitialize
status_t
BPartition::Uninitialize()
{
if (!fPartitionData || !_IsShadow())
return B_BAD_VALUE;
status_t error = _kern_uninitialize_partition(_ShadowID(),
_ChangeCounter());
if (error == B_OK)
error = Device()->Update();
return error;
}
// CanCreateChild
bool
BPartition::CanCreateChild() const