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:
parent
5c699c6735
commit
4c4e5505b0
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user