ufs2: implement scan_partition
Not needed by fs_shell but required to use the driver natively in Haiku. Change-Id: I547ab4c0637230d447f437cb47a419734a0401e7 Reviewed-on: https://review.haiku-os.org/c/haiku/+/3196 Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
f563d6e696
commit
14c58ad1bd
@@ -65,14 +65,26 @@ ufs2_identify_partition(int fd, partition_data *partition, void **_cookie)
|
||||
static status_t
|
||||
ufs2_scan_partition(int fd, partition_data *partition, void *_cookie)
|
||||
{
|
||||
return B_NOT_SUPPORTED;
|
||||
identify_cookie* cookie = (identify_cookie*)_cookie;
|
||||
|
||||
partition->status = B_PARTITION_VALID;
|
||||
partition->flags |= B_PARTITION_FILE_SYSTEM | B_PARTITION_READ_ONLY;
|
||||
partition->block_size = cookie->super_block.fs_bsize;
|
||||
partition->content_size = partition->block_size
|
||||
* cookie->super_block.fs_size;
|
||||
partition->content_name = strdup(cookie->super_block.fs_volname);
|
||||
if (partition->content_name == NULL)
|
||||
return B_NO_MEMORY;
|
||||
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
ufs2_free_identify_partition_cookie(partition_data *partition, void *_cookie)
|
||||
{
|
||||
dprintf("Unsupported in ufs2 currently.\n");
|
||||
identify_cookie* cookie = (identify_cookie*)_cookie;
|
||||
delete cookie;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user