disk_system add-ons: fix initialization
We never told the disk system that the partition had been initialized. As a result, the disk device jobs to clean and reinit the partition table were not run. This would lead to: - The bootloader code not being replaced with our MBR code - Old partitions not being removed from the disk This would maybe solve itself when creating a partition, but it's better to do these changes immediately when the user asks to initialize the disk. Fixes #9108. Change-Id: Icc8ebe3830d948367852a57cf46d034b0f1c6c19 Reviewed-on: https://review.haiku-os.org/c/haiku/+/3673 Reviewed-by: Niels Sascha Reedijk <niels.reedijk@gmail.com>
This commit is contained in:
parent
8579c7faf2
commit
0fbba5d721
@ -139,6 +139,7 @@ GPTDiskAddOn::Initialize(BMutablePartition* partition, const char* name,
|
||||
partition->SetContentParameters(NULL);
|
||||
partition->SetContentSize(
|
||||
round_down(partition->Size(), partition->BlockSize()));
|
||||
partition->Changed(B_PARTITION_CHANGED_INITIALIZATION);
|
||||
|
||||
*_handle = handle;
|
||||
return B_OK;
|
||||
|
@ -141,6 +141,7 @@ ExtendedPartitionAddOn::Initialize(BMutablePartition* partition,
|
||||
partition->SetContentParameters(NULL);
|
||||
partition->SetContentSize(
|
||||
sector_align(partition->Size(), partition->BlockSize()));
|
||||
partition->Changed(B_PARTITION_CHANGED_INITIALIZATION);
|
||||
|
||||
*_handle = handleDeleter.Detach();
|
||||
|
||||
|
@ -140,6 +140,7 @@ PartitionMapAddOn::Initialize(BMutablePartition* partition, const char* name,
|
||||
partition->SetContentParameters(NULL);
|
||||
partition->SetContentSize(
|
||||
sector_align(partition->Size(), partition->BlockSize()));
|
||||
partition->Changed(B_PARTITION_CHANGED_INITIALIZATION);
|
||||
|
||||
*_handle = handleDeleter.Detach();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user