intel disk system: restrict maximum supported size.
* The MBR can only address 2^32 blocks. * This prevents you from initializing a disk larger than 2TB with a block size of 512 bytes.
This commit is contained in:
@@ -90,8 +90,10 @@ PartitionMapAddOn::CreatePartitionHandle(BMutablePartition* partition,
|
|||||||
bool
|
bool
|
||||||
PartitionMapAddOn::CanInitialize(const BMutablePartition* partition)
|
PartitionMapAddOn::CanInitialize(const BMutablePartition* partition)
|
||||||
{
|
{
|
||||||
// If it's big enough, we can initialize it.
|
// If it's big enough, but not too big (ie. larger than 2^32 blocks) we can
|
||||||
return partition->Size() >= 2 * partition->BlockSize();
|
// initialize it.
|
||||||
|
return partition->Size() >= 2 * partition->BlockSize()
|
||||||
|
&& partition->Size() / partition->BlockSize() < UINT32_MAX;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user