From 11e9c3980cab1fb74f311ff562315b56a2f36109 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sun, 7 Oct 2007 14:50:25 +0000 Subject: [PATCH] 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 --- src/kits/storage/DiskSystem.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/kits/storage/DiskSystem.cpp b/src/kits/storage/DiskSystem.cpp index 9cc380479c..50050d7d8a 100644 --- a/src/kits/storage/DiskSystem.cpp +++ b/src/kits/storage/DiskSystem.cpp @@ -243,18 +243,22 @@ BDiskSystem::SupportsInitializing() const // GetNextSupportedType status_t 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) return InitCheck(); if (!cookie || !type || !partition || !partition->_IsShadow() - || !partition->Parent() || partition->Parent()->_DiskSystem() != fID - || !IsPartitioningSystem()) { + || partition->_DiskSystem() != fID || !IsPartitioningSystem()) { return B_BAD_VALUE; } + return _kern_get_next_supported_partition_type(partition->_ShadowID(), - partition->_ChangeCounter(), - cookie, type); + partition->_ChangeCounter(), cookie, type); } // GetTypeForContentType