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:
@@ -17,6 +17,7 @@ struct user_partition_data {
|
|||||||
partition_id shadow_id;
|
partition_id shadow_id;
|
||||||
off_t offset;
|
off_t offset;
|
||||||
off_t size;
|
off_t size;
|
||||||
|
off_t content_size;
|
||||||
uint32 block_size;
|
uint32 block_size;
|
||||||
uint32 status;
|
uint32 status;
|
||||||
uint32 flags;
|
uint32 flags;
|
||||||
@@ -55,7 +56,7 @@ struct user_disk_device_job_info {
|
|||||||
disk_job_id id;
|
disk_job_id id;
|
||||||
uint32 type;
|
uint32 type;
|
||||||
partition_id partition;
|
partition_id partition;
|
||||||
char desription[256];
|
char description[256];
|
||||||
};
|
};
|
||||||
|
|
||||||
// iterating, retrieving device/partition data
|
// iterating, retrieving device/partition data
|
||||||
|
|||||||
@@ -697,8 +697,6 @@ _kern_supports_resizing_partition(partition_id partitionID,
|
|||||||
int32 changeCounter, bool *canResizeContents,
|
int32 changeCounter, bool *canResizeContents,
|
||||||
bool *whileMounted)
|
bool *whileMounted)
|
||||||
{
|
{
|
||||||
if (!canResizeContents)
|
|
||||||
return false;
|
|
||||||
KDiskDeviceManager *manager = KDiskDeviceManager::Default();
|
KDiskDeviceManager *manager = KDiskDeviceManager::Default();
|
||||||
// get the partition
|
// get the partition
|
||||||
KPartition *partition = manager->ReadLockPartition(partitionID);
|
KPartition *partition = manager->ReadLockPartition(partitionID);
|
||||||
@@ -724,8 +722,10 @@ _kern_supports_resizing_partition(partition_id partitionID,
|
|||||||
return false;
|
return false;
|
||||||
// get the child disk system
|
// get the child disk system
|
||||||
KDiskSystem *childDiskSystem = partition->DiskSystem();
|
KDiskSystem *childDiskSystem = partition->DiskSystem();
|
||||||
*canResizeContents = (childDiskSystem
|
if (canResizeContents) {
|
||||||
&& childDiskSystem->SupportsResizing(partition, whileMounted));
|
*canResizeContents = (childDiskSystem
|
||||||
|
&& childDiskSystem->SupportsResizing(partition, whileMounted));
|
||||||
|
}
|
||||||
// TODO: Currently we report that we cannot resize the contents, if the
|
// 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
|
// 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.
|
// really matter, though, since the API user can check for this situation.
|
||||||
|
|||||||
Reference in New Issue
Block a user