Changed semantics of GetNextSupportedType(): It expects a pointer to the
parent (not the child) partition, now. A method with the old semantics is probably needed, too, but before creating a child partition, one obviously doesn't have a child to pass yet. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22469 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
2e3d6b83ca
commit
11e9c3980c
@ -243,18 +243,22 @@ BDiskSystem::SupportsInitializing() const
|
|||||||
// GetNextSupportedType
|
// GetNextSupportedType
|
||||||
status_t
|
status_t
|
||||||
BDiskSystem::GetNextSupportedType(BPartition *partition, int32 *cookie,
|
BDiskSystem::GetNextSupportedType(BPartition *partition, int32 *cookie,
|
||||||
char *type) const
|
char *type) const
|
||||||
{
|
{
|
||||||
|
// TODO: We probably need a second method for and modify the partitioning
|
||||||
|
// system module hook a little. This method takes the parent partition of
|
||||||
|
// a partition to be created for which we want to get supported types. It
|
||||||
|
// should also be possible to invoke it for the partition whose type to change
|
||||||
|
// though.
|
||||||
if (InitCheck() != B_OK)
|
if (InitCheck() != B_OK)
|
||||||
return InitCheck();
|
return InitCheck();
|
||||||
if (!cookie || !type || !partition || !partition->_IsShadow()
|
if (!cookie || !type || !partition || !partition->_IsShadow()
|
||||||
|| !partition->Parent() || partition->Parent()->_DiskSystem() != fID
|
|| partition->_DiskSystem() != fID || !IsPartitioningSystem()) {
|
||||||
|| !IsPartitioningSystem()) {
|
|
||||||
return B_BAD_VALUE;
|
return B_BAD_VALUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return _kern_get_next_supported_partition_type(partition->_ShadowID(),
|
return _kern_get_next_supported_partition_type(partition->_ShadowID(),
|
||||||
partition->_ChangeCounter(),
|
partition->_ChangeCounter(), cookie, type);
|
||||||
cookie, type);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetTypeForContentType
|
// GetTypeForContentType
|
||||||
|
Loading…
Reference in New Issue
Block a user