Added user_partition_data::content_size field. Small change to support a NULL parameter in _kern_supports_resizing_partition().

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4129 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2003-07-30 00:24:22 +00:00
parent 738e4a700b
commit 71346466b8
2 changed files with 6 additions and 5 deletions
@@ -697,8 +697,6 @@ _kern_supports_resizing_partition(partition_id partitionID,
int32 changeCounter, bool *canResizeContents,
bool *whileMounted)
{
if (!canResizeContents)
return false;
KDiskDeviceManager *manager = KDiskDeviceManager::Default();
// get the partition
KPartition *partition = manager->ReadLockPartition(partitionID);
@@ -724,8 +722,10 @@ _kern_supports_resizing_partition(partition_id partitionID,
return false;
// get the child disk system
KDiskSystem *childDiskSystem = partition->DiskSystem();
*canResizeContents = (childDiskSystem
&& childDiskSystem->SupportsResizing(partition, whileMounted));
if (canResizeContents) {
*canResizeContents = (childDiskSystem
&& childDiskSystem->SupportsResizing(partition, whileMounted));
}
// TODO: Currently we report that we cannot resize the contents, if the
// partition's disk system is unknown. I found this more logical. It doesn't
// really matter, though, since the API user can check for this situation.