disk_device_manager: implement KFileSystem::Resize()
Change-Id: I122a3881b0d0a8febc23c9751d5e32018c26da5e Reviewed-on: https://review.haiku-os.org/c/920 Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
13ce87c6f2
commit
b9256c155b
@@ -127,8 +127,20 @@ KFileSystem::Repair(KPartition* partition, bool checkOnly, disk_job_id job)
|
|||||||
status_t
|
status_t
|
||||||
KFileSystem::Resize(KPartition* partition, off_t size, disk_job_id job)
|
KFileSystem::Resize(KPartition* partition, off_t size, disk_job_id job)
|
||||||
{
|
{
|
||||||
// to be implemented
|
if (partition == NULL || fModule == NULL)
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
|
if (fModule->resize == NULL)
|
||||||
|
return B_NOT_SUPPORTED;
|
||||||
|
|
||||||
|
int fd = -1;
|
||||||
|
status_t result = partition->Open(O_RDWR, &fd);
|
||||||
|
if (result != B_OK)
|
||||||
|
return result;
|
||||||
|
|
||||||
|
result = fModule->resize(fd, partition->ID(), size, job);
|
||||||
|
|
||||||
|
close(fd);
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user